Important: The information in this document is obsolete and should not be used for new development.
NumToString
TheNumToString
procedure converts a long integer value into a Pascal string.
PROCEDURE NumToString (theNum: LongInt; VAR theString: Str255);
theNum
- A long integer value.
theString
- On output, contains the Pascal string representation of the number.
DESCRIPTION
NumToString
creates a string representation oftheNum
as a base-10 value and returns the result intheString
.If the value of the number in the parameter
theNum
is negative, the string begins with a minus sign; otherwise, the sign is omitted. Leading zeros are suppressed, except that a value of 0 produces the string "0".NumToString
does not include thousand separators or decimal points in its formatted output.SPECIAL CONSIDERATIONS
NumToString
may move memory; your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theNumToString
procedure are
Trap macro Selector _Pack7 $0000 The registers on entry and exit for this routine are
Registers on entry A0 pointer to the length byte that precedes theString
D0 the long integer value to be converted
Registers on exit D0 pointer to the length byte that precedes theString