IonicWind Software

Creative Basic => General Questions => Topic started by: TexasPete on October 15, 2009, 05:04:03 AM

Title: DEBUGGING AND SYNTAX ERROR
Post by: TexasPete on October 15, 2009, 05:04:03 AM
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.
Title: Re: DEBUGGING AND SYNTAX ERROR
Post by: sapero on October 15, 2009, 05:36:00 AM
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'.

if condition then action

if condition
action
endif
Title: Re: DEBUGGING AND SYNTAX ERROR
Post by: aurelCB on October 15, 2009, 06:19:12 AM
Yes Sapero is right Creative Basic dont support Then in this case.

IF ScreenAcross < 1500
ScreenAcross = ScreenAcross+100
ENDIF


I hope that you will remember this ;)