User Tools

Site Tools


CIGAL Reference Manual, Chapter 4 (Variables): ALEVEL

ALEVEL -- Integer variable controlling current alarm level

usage: alevel = value

ALEVEL is an internally defined number variable whose value controls the current priority level for software interrupts set by the ALARM command. An alarm must have a priority setting that is greater than or equal to the value of ALEVEL in order to execute. If an alarm's time has expired but its priority setting is less than ALEVEL it is simply postponed until either its priority is increased or ALEVEL is decreased enough to execute.

By default, ALEVEL is 0 and alarms are also set with priority 0. You can change ALEVEL to any NON-NEGATIVE value in order to manage alarm interrupts.

NOTE: Although normally alarms can only execute when CIGAL is in interactive mode and no other commands are executing, alarms with priority greater than 0 can also interrupt during command execution in special cases. That is, they can interrupt during the execution of a macro command (between commands within the macro), or at convenient moments during the execution of the SKETCH, EDIT, or WAIT commands. In all of these cases, therefore, an ALEVEL value of 0 is equivalent to an ALEVEL setting of 1.


    The most common use for ALEVEL is to temporarily suppress alarm interrupts
    when doing something that might be adversely affected by one of the alarm
    commands.  Because the highest possible alarm prioirity is 127, you could
    temporarily suppress all alarms by a command sequence like:
        #1 = alevel                     ; save the current ALEVEL setting
        alevel = 1000                   ; set ALEVEL impossibly high
         ...                            ; execute uninterruptable commands
        alevel = #1                     ; reset ALEVEL

See Also:

CIGAL Home, CIGAL Manual, Variables List, Manual Help

jvs/cigal/manual/chapter4/alevel.txt · Last modified: 2022/11/18 16:08 (external edit)