class BASE_FORMAT
****
Formats for the Basic types




Public


Constants
const force_exp_sign: INT := 16;
**** Exponent 'e' was followed by a '+'.
const force_sign: INT := 8;
**** The format expression started with '+'.
parse_dot_and_anchor,
**** Dot and anchor dicovered.
parse_filler_expected;
**** there was no filler behind an `F'.
parse_illegal_anchor,
**** Illegal or duplicate anchor.
parse_not_yet,
**** Not yet implemented feature requested.
parse_success,
**** Parse successfully completed.
parse_syntax_error,
**** Format string could not be parsed completely.
const use_anchor: INT := 32;
**** There was an anchor in the string.
const use_exponent: INT := 4;
**** There was an 'e' in the format string.
const use_precision: INT := 2;
**** There was a dot in the format string.
const use_width: INT := 1;
**** There was a hash sign in the width part.

Features
digit( i: INT ): CHAR
**** Print the digit represented be 'i'. Negative digits are considered as 'insignificant' digits and printed as zeros.
flt_fixed( f: $FLT, w: INT, d: INT, dotch: CHAR,
flt_fixed_exp( f: $FLT, w: INT, d: INT, force_sign: BOOL,
flt_free( f: $FLT, dotch: CHAR, force_sign: BOOL ): STR
**** Prints the number in standard representation as precise as possible. Uses at least width digits for the integer part of the number and prints a '+' sign if force_sign = true and the number positive.
flt_free_exp( f: $FLT, dotch: CHAR, force_sign: BOOL,
fmt_bool( b: BOOL, fmt: STR ): STR
**** Formatter for BOOL.
fmt_char( c: CHAR, fmt: STR ): STR
**** Formatter for CHAR.
fmt_cpx(c:CPX,fmt:STR): STR
**** Formatter for CPX.
fmt_cpxd( c: CPXD, fmt: STR ): STR
**** Formatter for CPXD.
fmt_flt( f: $FLT, fmt: STR ): STR
**** Formatter for FLT and FLTD.
fmt_int( i: INT, fmt: STR ): STR
**** Formatter for INT.
fmt_parse_easy(
fmt_str( s: STR, fmt: STR ): STR
**** Formatter for STR.
int_normal( int: INT, width: INT, anchor: INT, base: INT,
int_precision( int: INT, width: INT,


Private

const INTsize := INT::asize;
**** Number of bits in an INT.
const co_rel, co_nrm, co_abs;
**** Rounding modes for formatter.
const co_rel, co_nrm, co_abs;
**** Rounding modes for formatter.
const co_rel, co_nrm, co_abs;
**** Rounding modes for formatter.
cutoffadj( inout Mm: INTI, inout Mp: INTI, inout roundup: BOOL,
dragon4!(once e: INT,once f: INTI,once p: INT,
flt_data( f: $FLT, out s: BOOL, out e: INT, out m: INTI,
fmt_parse
init
**** Initalizing shareds only once.
lshift( i: INTI, n: INT ): INTI
**** Shift infinte integer 'i' 'n' binary positions to the left. Poor implementation as bitshift operations of INTI are not implemented.
make_exp( expt: INT, force_exp_sign: BOOL, exp_width: INT ): STR
**** Prints the exponent `expt'.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.
shared zero,one,two,nine,ten: INTI;
**** Predefined infinite integers.