Str, Str$ Functions

Named Arguments

No

Syntax

Str(number)


number

Use: Required

Data Type: Numeric Variant

Any numeric expression.

Return Value

A Variant of subtype String (returned by Str) or a String (returned by Str$) representing number.

Description

Converts number from a numeric to a string.

Rules at a Glance

If the return value is positive, the Str function always includes a leading space in the returned string for the sign of number.

Programming Tips and Gotchas

  • Use the LTrim function to remove the leading space that the Str function adds to the start of the returned string.

  • Both the CStr and Format functions have now superseded the Str function. The CStr function doesn't add a leading space for the sign of a positive number. The Format function is internationally aware, being able to recognize decimal delimiters other than the period (.).

See Also

CStr Function, Format Function, LTrim Function
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.181.66