Next: , Previous: , Up: Formatted Input/Output   [Contents][Index]

4.3.7 In-Line Print Formats

print and its aliases and printf use format system variables by default, or in-line format strings if specified.

The format system variables are !format_i, !format_f, !format_c, and !format_s, for integers, floats, complex numbers, and strings, respectively. They may be set by assignment or by routine format_set.

A newline is printed after treatment of all arguments, except if keyword /JOIN is specified in the call. Unless you specify keyword /RAW, LUX tries to avoid having a word (a sequence of alphabetical or numerical characters) cross the right edge of the screen (Long output lines)

A string argument which starts with one but not two percent signs is considered an (in-line) format string. Two inital percent signs are reduced to one and printed. An in-line format string may contain many formats. For each next argument, the next format entry (if any) will be copied into the appropriate format symbol. A format is maintained until the end of the current argument list or until it is superseded by another format from the same class (integer, float, or string).

Each argument takes the most recently defined format string that suits its data type.

See also: !format_c, !format_f, !format_i, !format_s, format_set, Output Data Formats, print, printf.