Activating and deactivating of HORUS control modes.
With the help of the operator set_check different control modes of the HORUS system can be activated or deactivated. If a certain control mode is activated, parameters etc. will be checked at runtime. Whenever an inconsistency is hereby detected, the program will be interrupted by an exception.
It is recommendable to activate the control modes during the development of a program and to deactivate them only after a successfully concluded testrun. For if the control mode is deactivated and an error occurs, the system may react in an unpredictable way.
The HORUS system provides various possible control modes which can be activated and deactivated independently. By calling the operator set_check with the name (Check) of the desired control mode, this control mode is activated; the control mode is deactivated by passing its name prefixed with a tilde (, e.g. 'data').
Available control modes:
'color' If this control mode is activated, only colors may be used which are supported by the display for the currently active window. Otherwise an error message is displayed. In case of the deactivated control mode and non existent colors, the nearest color is used (see also set_color, set_grey,set_rgb). 'text' If this control mode is activated, it will check the coordinates during the setting of the text cursor as well as during the display of strings (write_string) to the effect whether a part of a sign would lie outside the windowframe (a fact which is not forbidden in principle by the system). If the control mode is deactivaed, the text will be clipped at the windowframe. 'parameter' (For HORUS/PRO only) If this control mode is activated, output parameter may not be instantiated by calling a procedure.Otherwise a normal unification mechanism is used. 'data' (For program development) Checks the consistency of image objects (regions and grayvalue components. 'interface' If this control mode is activated, the interface between the host language and the HORUS\ procedures will be checked at runtime (e.g.\ typifying and counting of the values). 'database' This is a consistency check of the database (e.g.\ checks whether an object which shall be canceled does indeed exist or not.) 'give_error' Determines whether errors shall trigger exceptions or not. If this control mode is deactivated, the application program must provide a suitable error treatment itself. Please note that errors which are not reported usually lead to undefined output parameters which may cause an unpredictable reaction of the program. 'father' If this control mode is activated by calling the operator open_window, HORUS\ allows only the usage of the number of another HORUS\ window as the "father" of the new window; otherwise it allows also other X Window IDs. 'region' (For program development) Checks the consistency of the chords (this may lead to a notable speed reduction of routines). 'clear' Normally, if a list of objects shall be removed by using clear, an exception will be raised, in case individual objects do not or no longer exist. If the 'clear' mode is activated, such objects will be ignored. 'all' Activates all control modes. 'none' Deactivates all control modes. 'default' Original setting.
Check (input_control) |
string(-array) -> string |
Desired control mode. | |
Default value: 'default' | |
List of values: 'color', 'text', 'database', 'data', 'interface', 'give_error', 'father', 'region', 'clear', 'all', 'none', 'default' |
The operator set_check returns the value TRUE, if the parameters are correct. Otherwise an exception will be raised.
get_check, set_color, set_rgb, set_hsi, write_string