Click or drag to resize

StrLong Function

Convert a long integer expression to a PSZ.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION StrLong(
	liNumber AS LONG,
	dwLength AS DWORD,
	dwDecimals AS DWORD
) AS STRING
View Source

Parameters

liNumber
Type: Int32
The long integer expression to convert.
dwLength
Type: UInt32
The length of the string to return, including decimal digits, decimal point, and sign.  If <dwLength> is not long enough to hold the entire number,  the result will be in scientific notation.
dwDecimals
Type: UInt32
The number of decimal places to return.

Return Value

Type: String
Remarks
StrLong() is a typed version of the Str() numeric function, except that SetDecimalSep() is ignored.  See Str() for a detailed description.
Examples
These examples demonstrate the range of values returned by StrLong(), depending on the arguments specified:
X#
LOCAL liNumber AS LONGINT
liNumber := 12345L
? StrLong(liNumber, 5, 0)                        // "12345"
? StrLong(liNumber, 4, 0)                        //  "****"
? StrLong(liNumber, 2, 10)                // "**"
? StrLong(liNumber * 10, 7, 2)                // "****.**"
? StrLong(liNumber * 10, 12, 4)        // " 123450.0000"
? StrLong(liNumber, 10, 1)                // " 12345.0"
See Also