TypeConv

OpenTuring

TypeConv

Description   This unit contains the predefined subprograms that convert between different Turing standard types. There are also six routines that are part of the language, rather than part of the unit, but are conceptually part of this unit.

All routines in the TypeConv unit are exported unqualified.

Description of the routines in the TypeConv module can be found in this chapter.

Entry Points  
intreal Converts an integer to a real.
intstr* Converts an integer to a string.
natreal Converts a natural number to a real.
natstr* Converts a natural number to a string.
round Converts a real to an integer (rounding).
floor Converts a real to an integer (round down).
ceil Converts a real to an integer (round up).
realstr Converts a real to a string.
erealstr Converts a real to a string (exponential notation).
frealstr Converts a real to a string (no exponent).
strint* Converts a string to an integer.
strintok* Returns whether a string can legally be converted to an integer.
strnat* Converts a string to a natural number.
strnatok* Returns whether a string can legally be converted to a natural number.
strreal Converts a string to a real.
strrealok Returns whether a string can legally be converted to a real.
chr* Returns the ASCII value of a specified string of length one.
ord* Returns a string of length one with the ASCII value specified.

* Part of the language, conceptually part of the TypeConv unit.