A quick one: BASIC 2 doesn't have an else clause for IF statements, meaning that anything after the then command from the related if condition will be executed when the condition is true.
Although I can't think of many uses for it, there is a way to use ON ... GOTO like this:
Code: Select all
10 get a$:on -(a$="") goto 10:print "else logic here"
You can also check for multiple conditions, like this:
Code: Select all
10 print"1) menu item 1"
20 print"2) menu item 2"
30 print"3) menu item 3"
40 get a$:on -(a$<"1" or a$>"3") goto 40:on val(a$) gosub 100, 200, 300
50 end
100 print "you chose menu item 1":return
200 print "you chose menu item 2":return
300 print "you chose menu item 3":return
Regards,
Shaun.