FMTSDP function
Syntax
FMTSDP (dynamic.array, format [ , mapname ] )
Description
In NLS mode, use the FMTSDP function to format elements of dynamic.array for output in display positions rather than character lengths. Each element of the array is acted upon independently and is returned as an element in a new dynamic array. Any characters that cannot be mapped in dynamic.array are assumed to have a display length of 1.
format is an expression that evaluates to a string of formatting codes. The syntax of the format expression is:
[width] [background] justification [edit] [mask]
The format expression specifies the width of the output field, the placement of background or fill characters, line justification, editing specifications, and format masking. For complete syntax details, see the FMT function.
If format has a display length greater than 1, and there is only one display position left to fill, FMTSDP enters the extra fill character. The returned string can occupy more display positions than you intend.
mapname is the name of an installed map. If mapname is not installed, the display positions of the characters in dynamic.array are used. If any characters that cannot be mapped exist in dynamic.array, the display length is 1, that is, the unmapped character displays as a single character that cannot be mapped. If mapname is omitted, the map associated with the channel activated by the PRINTER statement ON statement is used; otherwise, the map associated with the terminal channel (or print channel 0) is used.
You can also specify mapname as CRT, AUX, LPTR, and OS. These use the maps associated with the terminal, auxiliary printer, print channel 0, or the operating system, respectively. If you specify mapname as NONE, the string is not mapped.
If dynamic.array evaluates to the null value, null is returned. If format evaluates to null, the FMTSDP function fails and the program terminates with a run-time error message.