September 26, 2020, 06:42:45 pm

News:

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


DEBUGGING AND SYNTAX ERROR

Started by TexasPete, October 15, 2009, 05:04:03 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TexasPete

CB is telling me that the following line of code has a syntax error in it.

IF ScreenAcross < 1500 then
ScreenAcross = ScreenAcross+100
endif

I have tried to use "STOP" in a line of code to bring the debugger up.  I am not having much luck. To my understanding the line should work.
I have another line that looks like the following and CB has no problem with it.

IF ScreenAcross > 0 then
ScreenAcross = ScreenAcross -100
endif

I assume there is some little unusual that I don't know.

Thanks
Texas Pete
Yes, I made sure the zeros are zeros.

sapero

I think 'then' keyword in CB does not support line wraps. You can remove it, or put the second line after 'then', and remove 'endif'.

Code Select
if condition then action

if condition
action
endif

aurelCB

Yes Sapero is right Creative Basic dont support Then in this case.

Code Select
IF ScreenAcross < 1500
ScreenAcross = ScreenAcross+100
ENDIF


I hope that you will remember this ;)
forum for hobby programming:<br />https://aurelsoft.ucoz.com