Page 2 of 2

Re: EndWhile

Posted: Tue May 01, 2012 11:14 pm
by MachineCode
Tenaja wrote:When someone has a feature request that they feel important enough to post, and others rant about how lame the request is, it is very annoying. Especially when it is a backwards-compatible request that does not force a change upon people.
Changing "Wend" to "EndWhile" is backwards-compatible and doesn't force change? :shock: Of course it forces change. It means we'd ALL have to change our source codes because of the personal preference of one other single person. That's a good thing? No way.

As for such requests being annoying, then perhaps people shouldn't request stuff that is going to directly affect everyone else negatively. Changing core keywords because you don't like them is not a trivial thing. It's a major change to the language.

Re: EndWhile

Posted: Tue May 01, 2012 11:40 pm
by USCode
MachineCode wrote:Changing "Wend" to "EndWhile" is backwards-compatible and doesn't force change? :shock: Of course it forces change. It means we'd ALL have to change our source codes because of the personal preference of one other single person. That's a good thing? No way.

As for such requests being annoying, then perhaps people shouldn't request stuff that is going to directly affect everyone else negatively. Changing core keywords because you don't like them is not a trivial thing. It's a major change to the language.
Please go back and carefully re-read my post:
USCode wrote:I'm not saying replace Wend, as it's already very well entrenched and in the BASIC tradition, but also allow EndWhile to be used to end a While loop as well.
Tough crowd around here! :wink:

Re: EndWhile

Posted: Tue May 01, 2012 11:55 pm
by Tenaja
Very first Line of This Thread wrote:For improved consistency, please consider adding EndWhile as a keyword to end a While loop.
...he didn't request a replacement for wend.

Re: EndWhile

Posted: Wed May 02, 2012 10:04 am
by MachineCode
I stand corrected. But if you don't want a replacement, then what's so bad about using your own macro?

Re: EndWhile

Posted: Wed May 02, 2012 1:54 pm
by Foz
There is nothing wrong with using your own macro, just like there is nothing wrong with doing a CompilerIf for defining the correct New Line string for each OS.

The point is when you keep having to do it for every major and minor app, you have to ask - why can't it be built in?

Perhaps, another method would be a "pre-pender" in that you can add in all your own common Macros and CompilerIf statements and gets pulled in by the compiler each time.

Re: EndWhile

Posted: Wed May 02, 2012 2:03 pm
by MachineCode
Foz wrote:The point is when you keep having to do it for every major and minor app, you have to ask - why can't it be built in?
Macros can be made part of a custom "Residents" file, so that they become part of the language set in the background and you don't need to type them in to every source. Problem solved! :)

Re: EndWhile

Posted: Wed May 02, 2012 2:51 pm
by Demivec
Foz wrote:There is nothing wrong with using your own macro, just like there is nothing wrong with doing a CompilerIf for defining the correct New Line string for each OS.

The point is when you keep having to do it for every major and minor app, you have to ask - why can't it be built in?

Perhaps, another method would be a "pre-pender" in that you can add in all your own common Macros and CompilerIf statements and gets pulled in by the compiler each time.
jaPBe allows aliases for commands. It can be set up so that when you type 'endwhile' it replaces it immediately with 'Wend'.

Not quite the same thing but useful to know.

Re: EndWhile

Posted: Wed May 02, 2012 4:50 pm
by Tenaja
MachineCode wrote:Macros can be made part of a custom "Residents" file, so that they become part of the language set in the background and you don't need to type them in to every source. Problem solved! :)
...Until you paste that code into the forum and it causes errors for everyone else.

I like the idea, if it weren't for that. Perhaps an automatically generated header, and you can just insert an include file.