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.
ATN, COS, SIN, and TAN Functions Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example finds the tangent of PI/4 and then uses the ATN function
' to find the arctangent of the value. Additional examples show how to
' find the cosine (COS), sine (SIN), and tangent (TAN) of a value.
 
' 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.141592653#
 PRINT ATN(TAN(PI / 4!)), PI / 4!   ' Output is:  .7853981635  .7853981635
 PRINT (COS(180 * (PI / 180)))      ' Output is:  -1
 PRINT (SIN(90 * (PI / 180)))       ' Output is:  1
 PRINT (TAN(45 * (PI / 180)))       ' Output is:  .9999999997050103
 LOCATE 24, 1: PRINT "Press any key to continue...";
 DO
 LOOP WHILE INKEY$ = ""