Str$

String = Str$ ( Expression ) String = Str ( Expression )

Convert an expression into its printable string representation. It is the exact contrary of Val.

The current localization is used for converting numbers and dates.

Example

' Print on standard output or in a message

Public Const ON_STDOUT As Integer = 1
Public CONST ON_MESSAGE As Integer = 2

Sub PrintOn(Where As Integer, What As Variant)

  If Where = ON_STDOUT Then
    Print What
  Else If Where = ON_MESSAGE Then
    Message(Str$(What))
  Endif

End

See also