@Dare2: You're making the same mistake as Vogel -- having "Then" like that
is just replacing one character (":") with four ("Then"), which is pointless.

Your code is bloated for no reason -- it can be done without "Then" like so:
Code: Select all
WITH : If caveMan then Debug "Still" : Else : Debug "Once" :EndIf
WITHOUT: If caveMan : Debug "Still" : Else : Debug "Once" :EndIf
The purpose of If/Then is to lose the need for having "EndIf" at the end of a
single decision -- nothing more. This was from back in the old days of Basic
when Else did not exist for an If/Then decision. Compare my original code:
Code: Select all
If age<21 : MessageRequester("Result","No beer drinking for you!") : EndIf
If age<21 Then (MessageRequester("Result","No beer drinking for you!"))
It's actually slightly shorter code and, if you're old-school like me, more friendly.
Now, that's not to say I'd use this Macro in my own code -- I made it more
of a proof-of-concept thing, to show it can be done. Although, it may make
converting other Basic apps to PureBasic a bit easier, as the coder doesn't
have to sit there and append ":EndIf" to the end of each single decision.
