Converting an expression to text

tostr()

Convert an expression to text


SYNTAX

tostr(expression [, format])

This function converts expression to text, using the Sculptor format specified in format. The format must be enclosed in double quotes. If the format is omitted, or set to “”, then the default format for the data type of expression is used.

This function returns an alphanumeric type.


EXAMPLES

info tostr(pr.number,"0000.00")
     open #1 "seqfile" read err = OPENERR
     ...

OPENERR:
     error "Error number " + tostr(sys.Error) / " generated"
if (NumFields = _MAXFIELDS) {
    info "No more fields can be added - maximum is " + tostr(_MAXFIELDS)
}

RELATED TOPICS

String handling functions

Field formats