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

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

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

Post by DR White » Sat Feb 06, 2021 1:37 pm

I have forgotten "How to continue an IF statement on next line".
Last edited by DR White on Sat Feb 06, 2021 1:49 pm, edited 1 time in total.

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Sat Feb 06, 2021 1:44 pm

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
Image

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

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

Post by DR White » Sat Feb 06, 2021 1:49 pm

Yes, example #3 was what I was asking for.

Bogs,

Thanks so much,

David

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Sat Feb 06, 2021 2:05 pm

No problems, glad it helped :)
Image

Post Reply