Mark Wickens

back to Command Reference

SET

[All Models]

Purpose

Specifies output format of numeric data.

Format

       + F     number of digits
       |     ---------------------
       |     Single character; 0~9
 SET   |
       | E     number of digits
       |     ---------------------
       |     single character; 0~9
       + N

Example

SET F3

Parameters

Explanation

  1. This command specifies the number of decimal places and the number of significant digits for numeric data output to the display, printer, tape recorder or RS-232C terminal.
  2. The number of decimal places can be specified within the range of 0 through 9.
  3. The number of significant digits can be specified within the range of 1 through to 10.
  4. The statement SET N cancels both specifications.
  5. Output values are rounded to the specified decimal places or to the specified significant digits.
  6. This command is only valid for output data. The mantissa part for internal calculations is still 12 digits.

Sample Program

10 A = 10/3
20 SET F2
30 PRINT A
40 SET E2
50 PRINT A
60 END
RUN
 3.33
 3.3E+00
 3.333333333

Result of 10/3 displayed with 2 decimal places, 2 significant digits, and specification cancelled.