Go to the first, previous, next, last section, table of contents.

Fmt Interface

The Fmt Interface converts BOOLEAN, CHAR, INTEGER, and floating point values to TEXT. The Pad routine also allows justifying TEXT in a field of spaces or other character. See the description of Fmt interface for more information.



Example

Format two integers, one positive and one negative.

Fmt.Int(15) = "15"
Fmt.Int(-25) = "-25"

Format the floating-point number "num" using "style" with "prec" digits after the decimal point. If "literal" is TRUE, the result is a legal Modula-3 literal.

Fmt.Real(5.5678,prec := 2) = "5.57"

Pad text strings with extra characters.

Fmt.Pad("Info",6) = "  Info"
Fmt.Pad("Database",5) = "Database"
Fmt.Pad("15.55",8,'*') = "***15.55"


Go to the first, previous, next, last section, table of contents.