Examples: Str function

' Assign the strings " 123" and "-123" to the variables
' string1 and string2, respectively. For the positive value,
' note the addition of a leading space.
Dim string1 As String, string2 As String
string1$ = Str$(123)               ' Assigns " 123"
string2$ = Str$(-123)              ' Assigns "-123"
Print string2$; string1$
' Output:
' -123 123