Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-242
FORMATCONVERT[X] Procedure
Syntax for TAL Programmers
Parameters
status returned value
INT
is a value indicating the outcome of FORMATCONVERT[X]:
> 0 Indicates successful conversion. The value is the number of bytes in the
converted format (
iformat).
= 0 Indicates
iformatlen was insufficient to hold the entire converted
format.
< 0 Indicates an error in the format. The value is the negated byte location in
the input string at which the error was detected. The first byte of
eformat is numbered 1.
iformat output
STRING:ref:* (Use with FORMATCONVERT)
STRING .EXT:ref:* (Use with FORMATCONVERTX)
is an array in which FORMATCONVERT[X] stores the converted format. The
contents of this array must be passed to the FORMATDATA[X] procedure as an
integer parameter, but FORMATCONVERT requires it to be in byte-addressable G-
relative storage. Thus
iformat must be aligned on a word boundary, or the
contents of
iformat must be moved to a word-aligned area when it is passed to
FORMATDATA[X]. (The area passed to FORMATDATA need not be in byte-
addressable storage.)
iformatlen input
INT:value
is the length, in bytes, of the
iformat array. If the converted format is longer than
iformatlen, the conversion terminates and a status value <= 0 returns.
status := FORMATCONVERT[X] ( iformat ! o
,iformatlen ! i
,eformat ! i
,eformatlen ! i
,scales ! o
,scale-count ! i,o
,conversion ); ! i