Skip to main content
Home Forums 68kMLA Apple IIc programming confusion — #9
Post #9 by luddite
Source Forum68kMLA
CategorySoftware
Post DateWed, 25 Feb 2009 - 03:31
Original URLhttps://68kmla.org/bb/threads/apple-iic-programming-confusion.16696/
Post
DIM A$(1), B$(1), C$(1) or even simpler DIM A$, B$, C$
Neither is necessary... the first will create arrays and the second AFAIK won't do anything. Simply changing the variable to string variables works just fine

Code:
 10  HOME
20  INPUT "What state do you live in?";A$
30  IF A$ = "Ohio" THEN  GOTO 50
40  IF A$ <  > "Ohio" THEN  GOTO 10
50  INPUT "Correct! Type 'next' for the next question.";B$
60  IF B$ = "next" THEN  GOTO 70
70  HOME
80  INPUT "What month is this?";C$
90  IF C$ = "February" THEN  GOTO 110
100  IF C$ <  > "February" THEN  GOTO 70
110  PRINT "Correct! Thus concludes this program."
120  END
Edit: If I was paying attention I might have noticed that Dave Schmidt already corrected the program... so much work for nothing! ;-)

mp.ls