IonicWind Software

IWBasic => General Questions => Topic started by: GJ on October 29, 2007, 06:17:27 AM

Title: CLEAR
Post by: GJ on October 29, 2007, 06:17:27 AM
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


Title: Re: CLEAR
Post by: GWS on October 29, 2007, 10:18:07 AM
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 :)
Title: Re: CLEAR
Post by: GJ on October 29, 2007, 10:58:07 AM
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


Title: Re: CLEAR
Post by: GWS on October 29, 2007, 02:38:45 PM
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 :)
Title: Re: CLEAR
Post by: LarryMc on October 29, 2007, 02:56:30 PM
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