STR$()

STR$(V)

RETURNS THE STRING CORRESPONDING TO THE NUMBER V

  • Type: Function
  • Parameter: 1
  • Group: Strings

ACTION

The function STR$(V) returns the string corresponding to the number V.

STR$(V) performs the inverse fonction of VAL(N).

Remark: the keyword STR$ ends by '$' : it means that the returned value is a string.

SYNTAX: Result$=STR$(V)

  • V = number to be converted. It can be integer or real.
  • Result$ is a string.

USE

  • The function STR$() is used to convert a number into a string for example to print it or to display it buy means of the command MESSAGE or CAPTION.

ERROR

  • If V is not a number.
  • If V is not a correct expression.

EXAMPLE

print str$(1234)

print "1234"

SEE ALSO

INSERT$()

INSTR()

LEFT$()

LEN()

LOWER$()

LTRIM$()

MID$()

RIGHT$()

RTRIM$()

STRING$()

TRIM$()

UPPER$()