ex.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.
CIRCLE Statement Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses the CIRCLE statement to:
' • Draw a circle with the upper-left quarter missing
' • Position a second circle, using relative coordinates, within the
'   missing quarter
' • Draw a small ellipse inside the small circle, using a different aspect
'   ratio
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Copy the code example below to the code window
' 3. Press F5 to run the example
 
 CLS                            ' Clear the screen
 CONST pi = 3.141593            ' Define constant pi
 SCREEN 2                       ' Set screen mode to 2
 
                                         ' Draw a circle with the upper-left
 CIRCLE (320, 100), 200, , -pi, -pi / 2  ' quarter missing; use negative
                                         ' numbers so radii are drawn
 
                                ' Use relative coordinates to draw a circle
 CIRCLE STEP(-100, -42), 100    ' within the missing quarter
 
                                ' Draw a small ellipse inside the circle
 CIRCLE STEP(0, 0), 100, , , , 5 / 25
 
                                ' Display the drawing until a key is pressed
 LOCATE 25, 1: PRINT "Press any key to end.";
 DO
 LOOP WHILE INKEY$ = ""
 SCREEN 0