INACTIVE()

INACTIVE(N)

RETURNS 1 IF THE SYSTEM OBJECT NUMBER N IS NOT ACTIVE, 0 OTHERWISE

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

ACTION

The function INACTIVE(N) returns 1 if the system object designated by its number N is inactive.

By default, the state of a system object is "active". A system object can be made inactive by the command INACTIVE and made active again by the command ACTIVE.

A TIMER is active by default or after the command TIMER_ON. A TIMER is inactive after the command TIMER_OFF.

Remark 1: Another function ACTIVE(N) returns 1 if the system object designated by its number N is active.

Remark 2: The system objects of type : MAIN_MENU, SOUND, OPEN_DIALOG, SAVE_DIALOG, DLIST, MAIN_MENU_POP, OPEN_DIALOG_PIC, SAVE_DIALOG_PIC, SERIAL, IMAGE cannot be inactivated. The functions ACTIVE(N) or INACTIVE(N) trigger an error if applied to these system objects.

SYNTAX: Result=INACTIVE(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.

USE

  • The function INACTIVE() is used to know if a system object is inactive.

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 the object number N is of type : MAIN_MENU, SOUND, OPEN_DIALOG, SAVE_DIALOG, DLIST, MAIN_MENU_POP, OPEN_DIALOG_PIC, SAVE_DIALOG_PIC, SERIAL, IMAGE.

EXAMPLE

rem create a BUTTON

button 1:caption 1,"button"

inactive

rem print its activity state

print

print

print active(1)

print inactive(1)

SEE ALSO

ACTIVE

INACTIVE

ACTIVE()