What About Newbies
Mark Wieder
mwieder at ahsoftware.net
Sun Jul 10 00:02:23 EDT 2005
Tom-
Saturday, July 9, 2005, 7:05:24 PM, you wrote:
TM> How about a basic explanation of an If/Then and a Do While algorithm?
To tide you over until you get the book, how about:
-- this asks for input and just compares it to a value.
ask "please type a number"
if it is 123 then
answer "you got it!"
else
answer "try again"
end if
-- here's a version that loops until you get the right answer
-- the repeat / end repeat construct is the equivalent
-- of the "do while" construct you'll find elsewhere
repeat until x is 123
ask "please type a number"
put it into x
end repeat
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list