Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for WHILE/WEND #89

Open
udhos opened this issue Jan 25, 2019 · 2 comments
Open

Support for WHILE/WEND #89

udhos opened this issue Jan 25, 2019 · 2 comments
Labels
fantasy Something that might be interesting. wontfix This will not be worked on

Comments

@udhos
Copy link

udhos commented Jan 25, 2019

gobasic should support WHILE/WEND.

Documentation: http://www.antonis.de/qbebooks/gwbasman/whilewend.html

$ gobasic while.bas 
Error running program:
	Line 20 : Object{Type:error, Value:The variable 'while' doesn't exist}
$ 
$ more while.bas 
10 let a=1
20 while a<=10
30 print a
40 let a=a+1
50 wend
@skx skx added wontfix This will not be worked on fantasy Something that might be interesting. labels Jan 25, 2019
@skx
Copy link
Owner

skx commented Jan 25, 2019

Patches welcome, but I regard this as something I'd not be personally interested in implementing.

In my view simple BASIC uses FOR-loops, and line-numbers. Things like WHILE/WEND is the start of a slippery-slope that ends up supporting "ON ERR GOTO .." and other advanced constructs often those more advanced dialects of BASIC don't even need line-numbers, and allow functions with named-parameters, etc.

Some extensions, and expansions I can be persuaded are useful. (Such as your LET-less assignments, and READing into an array.) But I think there are limits, and whenever I'm unsure I just think back to my ZX Spectrum.

This is a deliberately minimal project, which is a little retro and niche. It won't make all scripts run, or all users happy, and I'm OK with that. It is, after all, just a weekend hack that got a bit bigger because it was fun to play with :)

@udhos
Copy link
Author

udhos commented Jan 25, 2019

Of course you should add features only if you find fun in doing so, I fully understand that.

I reported this request for WHILE/WEND because they were present in the old classical BASICA/GW-BASIC dialect for PCs. WHILE/WEND was not a "modern" extension added by things like QBASIC, QuickBasic, VisualBasic, etc.

Have a look at the GW-BASIC manual: http://www.antonis.de/qbebooks/gwbasman/whilewend.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fantasy Something that might be interesting. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants