TEXT$()

TEXT$(N)

RETURNS THE TEXT DISPLAYED BY THE SYSTEM OBJECT NUMBER N

  • Type: Function
  • Parameter: 1
  • Group: System Objects

ACTION

The function TEXT$(N) returns the text T displayed by the system object designated by its number N.

The system object is an EDIT or a COMBO.

Remark: the keyword TEXT$ ends by '$' because the returned value is a string.

SYNTAX: Result$=TEXT$(N)

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • Result$ is a string.

USE

  • The function TEXT$() is used to know the text displayed by an EDIT or a COMBO, which is entered or modified by the user.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If the object number N does not exist.
  • If number N is not the number of an EDIT or a COMBO.

EXAMPLE

rem create an EDIT

edit 1

rem print the text entered by the user

print text$(1)

SEE ALSO

EDIT

COMBO

TEXT