Page 1 of 1

How to continue an IF statement on next line? - Solved

Posted: Sat Feb 06, 2021 1:37 pm
by DR White
I have forgotten "How to continue an IF statement on next line".

Re: How to continue an IF statement on next line?

Posted: Sat Feb 06, 2021 1:44 pm
by bogs
Not sure exactly what you mean, but here are some variations on the 'if' statement.

Code: Select all

# if / then on a single line...
	if bool is true then <commands that finish the statement>

# more traditional if / then structure...
	if a=xy then
	   add z to xy
	   move button 4 to xy
	end if

# line continuation character is '\', in case this is what you meant....
	if a is among the numbers of field 2 then put a + b \
	    into field 4

Re: How to continue an IF statement on next line?

Posted: Sat Feb 06, 2021 1:49 pm
by DR White
Yes, example #3 was what I was asking for.

Bogs,

Thanks so much,

David

Re: How to continue an IF statement on next line? - Solved

Posted: Sat Feb 06, 2021 2:05 pm
by bogs
No problems, glad it helped :)