qb45advr.hlp (Topic list)
GOTO Statement Programming Example
  QuickSCREEN      Details     Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
GOTO Statement Programming Example
 
This example calculates the area of a circle after you supply the radius.
 
CLS      ' Clear screen
PRINT "Input 0 to end."
Start:
   INPUT R
   IF R = 0 THEN
     END
   ELSE
      A = 3.14 * R ^ 2
      PRINT "Area ="; A
   END IF
GOTO Start
 
Sample Output
 
Input 0 to end.
? 5
Area = 78.5
? 0