Loading...
 

Truncate

Truncate

Truncate(fmtString, flags), Truncate(fmtString), Truncate(, flags), Truncate

parameters: format string for sprintf, flags for ViewExport

Stack
Stack Position Description
Stack(In) Top any
Stack(Out) Top a character string

As with the String statement, any data is transformed from the stack top into a character string. Afterwards, spaces at the end of the result string are truncated.

Truncate(LEFT/RIGHT/BOTH), Truncate(LEFT/RIGHT/BOTH, flags)

parameters: keyword 'LEFT', ('RIGHT' 'BOTH' (from DLL version: 182419)), flags for ViewExport

Stack
Stack Position Description
Stack(In) Top any
Stack(Out) Top a character string

LEFT' removes leading spaces.
RIGHT' removes spaces at the end of the input string.
BOTH' removes both.
If no parameter is passed, 'RIGHT' is used.

Truncate(NUMERIC), Truncate(NUMERIC, flags)

parameters: Keyword 'NUMERIC', Flags for ViewExport

Stack
Stack Position Description
Stack(In) Top any
Stack(Out) Top a character string

As with the String statement, any data is transformed from the stack top into a character string. Redundant leading zeros of a number are removed. Truncate(NUMERIC) includes the functionality of Truncate(LEFT) - first the character string from links is reduced by leading spaces and then by redundant zeros.

Related topics