Equinox Online Help - Language Reference - A to Z
Str |
|
---|---|
Applies to | |
Syntax | Str(NumberExpression, [LengthExpression ],[DecimalsExpression], [FormatExpression]) |
Action | [Function] Returns a specified number as a string. |
Scope | Usable anywhere. |
Notes | This function converts NumberExpression into a string format. eg 23 becomes "23". FormatExpression (optional) determines the style of the returned string. Possible values of FormatExpression (the default is zero) are:
You may add any of these values together to make combined formats. eg A value of five would produce a string with trailing zeros and comma separators. Note that if you specify both leading zeros and spaces, or following zeros and spaces, Equinox uses spaces only. LengthExpression and DecimalsExpression specify the string length and number of decimal places that are included. If you omit LengthExpression, then Equinox uses the minimum size required to fit in the whole number. If you omit DecimalsExpression then they are all included. If you want to include trailing or leading characters (specified in FormatExpression) you must include both optional arguments, as Equinox uses them to determine how many leading/ trailing characters to include. |
Category | Conversions |
See Also | Asc, Card, ChoosePrinter, HexNum, HexStr, Lowercase, Ord, StrCase, StrDate, StrTime, Uppercase |
Example | In the following examples, the notes show what is printed (in the Print window) by each statement. Print Str (421, , , 0) | "421" The last example shows what happens when the string size is too short. The function returns an asterisk character. |