BBC BASIC for Windows
« Wishlist of minor editor suggestions »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:39pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Wishlist of minor editor suggestions  (Read 6799 times)
softweir
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx 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?
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx 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
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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 » User IP Logged

softweir
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx 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.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls