StrLong Function | |
Convert a long integer expression to a PSZ.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION StrLong(
liNumber AS LONG,
dwLength AS DWORD,
dwDecimals AS DWORD
) AS STRING
public static string StrLong(
int liNumber,
uint dwLength,
uint dwDecimals
)
Request Example
View SourceParameters
- liNumber
- Type: Long
The long integer expression to convert. - dwLength
- Type: DWord
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: DWord
The number of decimal places to return.
Return Value
Type:
StringRemarks
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:
1LOCAL liNumber AS LONGINT
2liNumber := 12345L
3? StrLong(liNumber, 5, 0)
4? StrLong(liNumber, 4, 0)
5? StrLong(liNumber, 2, 10)
6? StrLong(liNumber * 10, 7, 2)
7? StrLong(liNumber * 10, 12, 4)
8? StrLong(liNumber, 10, 1)
See Also