'If then else Demosnstration 'Run this program and use the step or animate option to follow the code. y var word y = 1 debug [10,13] main: debug [dec y," "] 'Display the current count 'Test for 5 if y=5 then gosub five 'Test for 21 if y = 21 then debug [10,13,"Have 21",10,13] endif 'Here we will test to see how close we are to being done. if y = 50 then debug [10,13,"All Done",10,13] debug ["However we will do it all again",10,13,10,13] y=1 'We are done reset the counter goto main elseif y = 45 debug [10,13,"5 more to go",10,13] y=y+1 'At this point lets increment the counter goto main else y=y+1 'At this point lets increment the counter goto main endif 'A little subroutine test five: debug [10,13,"Have 5",10,13] return