qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
.gotox
:nGOTO 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