May 09, 2024, 01:18:12 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


CLEAR

Started by GJ, October 29, 2007, 06:17:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GJ

Since it has no use in Ebasic it problably will not do any harm ..  ;D

'compile as console
int a
a=1
print a
clear a : 'cbasic statement not getting error while compiling in Ebasic
clear what a wonderful nice option to get remarks in a program without a ' or REM

print a
do:until inkey$<>""
END


Just wondering.....


Gertjan



GWS

I'm not sure I follow you Gertjan ..  :)

Clear isn't often used, but is intended to undefine a variable of one type, so that it can be re-defined as another type ..

It doesn't relate to comments as far as I know ..

I always use ' Comments .. myself.

Graham :)
Tomorrow may be too late ..

GJ

Hi Graham,

Yes, you're right if it is Creative Basic. If you run the sample i included on Ebasic you will see that it will not generate an error, which i suspected it should be   ;)



Gertjan



GWS

Ah  . I see ..  :)

I can't check it here 'cos I've only got smooth, cool, yummy Creative Basic loaded at the moment ..   :P
It points up the problems in your example immediately.

Maybe the EB parser is seeing it as some sort of long-line continuation from the CLEAR a: ' ....   line above.

Graham :)
Tomorrow may be too late ..

LarryMc

Quote from: GWS on October 29, 2007, 02:38:45 PM
Maybe the EB parser is seeing it as some sort of long-line continuation from the CLEAR a: ' ....   line above.
Graham
That's not the case either because it still compiles fine if I remove the remark line entirely.

Paul will tell us why later.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library