Home / lang / str 
Str$
Syntax
String = Str$ ( Expression )
String = Str ( Expression )

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

The current localization is used to convert numbers and dates.

Examples

' 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

Conversion Functions  PRINT