6.1.2.3.1.20 Str / Str$
Function Declaration
-
Function Str(Number As Variant) Function Str$(Number As Variant) As String
Parameter |
Description |
---|---|
Number |
Any data value (section 2.1). |
Runtime Semantics.
§ If the data value of Number is Null, Null is returned.
§ If the value of Number is an Error (section 2.1) data value then the returned value is the String data value consisting of "Error" followed by a single space character followed by the String that is the result of the Long error code (section 2.1) of the Error data value Let-coerced to String (section 5.5.1.2.4).
§ If the value type of Number is Date, the returned value is the result of Let-coercing Number to String.
§ If the data value of Number is any numeric value type, let S be the result of Let-coercing Number to String using "." as the decimal separator. If the data value of Number is positive (or zero) the result is S with a single space character appended as its first character, otherwise the result is S.
§ Otherwise, the returned value is the result of the Str function applied to the result of Let-coercing Number to Double.
§ Str$ is identical to Str except for the declared type of its return value.