www.delorie.com/gnu/docs/gforth/gforth_137.html   search  
Buy GNU books!

Gforth Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.18.1 Simple numeric output

The simplest output functions are those that display numbers from the data or floating-point stacks. Floating-point output is always displayed using base 10. Numbers displayed from the data stack use the value stored in base.

doc-. doc-dec. doc-hex. doc-u. doc-.r doc-u.r doc-d. doc-ud. doc-d.r doc-ud.r doc-f. doc-fe. doc-fs.

Examples of printing the number 1234.5678E23 in the different floating-point output formats are shown below:

f. 123456779999999000000000000.
fe. 123.456779999999E24
fs. 1.23456779999999E26

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003