•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.98 (12/31/2023)
Subject     : Documentation/Programming
Nodes       : 899
Index Size  : 28056
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-FileDEFNUM n

n: iexp

DEFNUM affects the output of numbers by the PRINT command and its variants.
All numbers following the DEFNUM instruction are outputted to occupy n
character positions, not counting the decimal point. Rounding takes place based
on the value of the (n+1)-th digit. The internal computational accuracy is not
affected.

Example:

    PRINT 100/6
    DEFNUM 5
    PRINT 100/6

--> The numbers 16.66666666667 and 16.667 appear on the screen.

Memo: Only values =>3 are accepted, lower numbers are ignored.
      The upper limit appears to be 14.
      The default is 13.
      DEFNUM 14 seems to work and outputs the result minus the rounding.