Author |
Topic: Wishlist of minor editor suggestions (Read 6798 times) |
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Wishlist of minor editor suggestions
« Reply #25 on: Nov 2nd, 2010, 06:18am » |
|
The idea of highlighting the line(s) wasn't as one would note a routine with a REM or a subsection with a band of boardered marks, but just as a temporary mark to 'highlight' a place for easy note, as one might mark a place in a rough document to be delt with later or to allow you to quickly recognise the line you're dealing with at a later stage. I often wizz around the coding trying to find the exact lines that I was dealing with.
Which brings me to another suggestion: Would there be a way of being able to flick backwards and forwards between two places. There is the 'Go back' item in the context menu, which is very useful, but the ability to alternate between the two previous points with the click of a key-combination seems to me to be a very useful thing to do.
Matt
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Wishlist of minor editor suggestions
« Reply #26 on: Nov 2nd, 2010, 09:23am » |
|
on Nov 2nd, 2010, 06:18am, Matt wrote:| There is the 'Go back' item in the context menu, which is very useful, but the ability to alternate between the two previous points with the click of a key-combination seems to me to be a very useful thing to do. |
|
You could put a 'bookmark' at one of the points that you want to flip between. A bookmark is a DEF not followed by PROC or FN. For example:
Code: Bookmarks appear in the right-click context menu, along with the PROCs and FNs, so you can jump straight there by clicking on the bookmark in that menu. You could flip between two points by alternating Go back and jumping to the bookmark.
Richard.
|
|
Logged
|
|
|
|
softweir
New Member
member is offline


Posts: 12
|
 |
Re: Wishlist of minor editor suggestions
« Reply #27 on: Nov 10th, 2010, 12:02am » |
|
on Oct 6th, 2010, 08:38am, knudvaneeden wrote:| But inversely, it is probably much easier to find out where a (new) function, procedure or methods *begins*. |
|
I haven't tried this, but I seem to remember that it is possible for a BB4W program to have multiple entry points to a procedure or function. So for example:
Code:PROCprocedure1a()
PROCprocedure1b(7)
PROCprocedure1c("numero",7)
END
DEF PROCprocedure1a()
LOCAL numeral%=0
DEF PROCprocedure1b(numeral%)
LOCAL text$="Number"
DEF PROCprocedure1v(text$,numeral%)
PRINT text$;" ";numeral%
ENDPROC (This is, of course, hideously bad programming practice!)
While PROCprocedure1a is being interpreted, the lines starting DEF PROCprocedure1b and DEF PROCprocedure1c are ignored, and it is interpreted as:
Code:DEF PROCprocedure1a()
LOCAL numeral%=0
LOCAL text$="Number"
PRINT text$;" ";numeral%
ENDPROC Similarly, PROCprocedure1b is interpreted as:
Code:DEF PROCprocedure1b(numeral%)
LOCAL text$="Number"
PRINT text$;" ";numeral%
ENDPROC I don't know if there are any real-world examples of code such as this (and I hope there aren't!) but any such code would seriously confuse a folding editor.
Hum. Perhaps that would be a good argument FOR a hypothetical folding editor?
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Wishlist of minor editor suggestions
« Reply #28 on: Nov 10th, 2010, 05:17am » |
|
I notice Richard has used this practice in various places in the LIBs. One obvious case is in WINLIB5 where there are 6 DEFs together. However, the difference is that the LOCALs are on the same line as the DEF, therefore eliminating unnecessary multiple/overlapping LOCALs. I wouldn't know if this was good or bad practice, but it obviously works, and works well.
Matt
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Wishlist of minor editor suggestions
« Reply #29 on: Nov 10th, 2010, 08:40am » |
|
on Nov 10th, 2010, 12:02am, softweir wrote:| I don't know if there are any real-world examples of code such as this (and I hope there aren't!) |
|
I use that technique regularly. I don't consider it particularly bad practice. Any BBC BASIC editor would have to cope with it.
Richard.
|
| « Last Edit: Nov 10th, 2010, 08:41am by admin » |
Logged
|
|
|
|
softweir
New Member
member is offline


Posts: 12
|
 |
Re: Wishlist of minor editor suggestions
« Reply #30 on: Nov 11th, 2010, 5:32pm » |
|
Oh dear. I have managed to be unintentionally offensive (for which I apologise) and made myself look foolish.
Still, all this does strongly enforce the point that a BASIC IDE needs to be very flexible regarding the beginnings and ends of code structures, so much so that a hypothetical folding editor seems totally impracticable.
|
|
Logged
|
|
|
|
|