Next: strlen, Previous: stretch, Up: Internal Routines [Contents][Index]
string([ format,] arg [, …, /skip_undefined])
string, arg [, …]
With more than one argument, function string
is a synonym of
fstring
. If only a single argument is specified, then this
argument may be a string, string array, or scalar. With a scalar
argument, function string
transforms the argument to an ascii
string under guidance of the appropriate standard format
(!format_c
, !format_i
or !format_f
, and removes
initial whitespace. With a string array argument, function
string
returns a copy transformed to a single continuous string,
stringing all elements of arg
together. With a string
argument, function string
just returns that (i.e., does nothing).
The subroutine form converts its arguments to text strings; scalars (real or complex) are transformed to strings, and arrays (real or complex) are transformed to string arrays.
In the future, the behavior of the one-argument string
function
will be made compatible with the string
subroutine.