CAPTION$()

CAPTION$(N)

RETURNS THE CAPTION OF THE SYSTEM OBJECT NUMBER N

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

ACTION

The function CAPTION$(N) returns the caption of the system object number N.

The system object N must be one of the following types: BUTTON, ALPHA, FORM, CHECK, OPTION, SUB_MENU.

Remark 1: if no caption has been allocated to system object number N, CAPTION$(N) returns "" (the empty string).

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

SYNTAX: Result$=CAPTION$(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 CAPTION$() is used to know the caption of a system object.

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 system object number N does not exist.
  • If number N is not the number of BUTTON, ALPHA, FORM, CHECK, OPTION, SUB_MENU.

EXAMPLE

rem create a BUTTON

button 1

rem give it a caption

caption 1,"Compute"

rem print this caption

print

print

print caption$(1)

SEE ALSO

BUTTON

ALPHA

FORM

CHECK

OPTION

SUB_MENU