ONINTGO |
Onintgo allows a label to be declared in a routine identifying where the routine shall be sent for execution when the break key is pressed.
Onintgo [ label ] [ From routine ]
|
Element |
Description |
Restrictions |
|
label |
Branch label in the event of break. |
None. |
|
routine |
Routine in which the label is
defined (the current routine by default), in one of the following forms: |
The routine must be accessible. |
|
exp_nomtrt |
Alphanumeric expression whose result is the name of a routine. |
The routine must be accessible. |
# When the break key is pressed, execution
of the routine
# is branched to the LECTURE label.
# The routine may be interrupted
Inter
# on
<INTERRUPTION>, go to LECTURE
Onintgo LECTURE
For [LNS]CLE(1)
For [LNS]CLE
Infbox num$(ZV)
Next
Infbox num$(TOTAL)
Next
End
#
# break routine
LECTURE
Call VERIF From
GESINTER
Resume
Onintgo allows a label to be defined identifying where the routine shall be sent for execution when the break key is pressed. If a break is triggered after the Onintgocommand, the part of the routine following the label is executed.
In the break routine, the errl function contains the number of the line in the routine where the break was triggered.
An break routine ends either with Resume or with End. In the former case, the routine interrupted will resume at the instruction following that at which the break occurred. In the second case, the routine is not resumed.
The break is initiated as long as:
· the routine can be interrupted (Inter instructon),
· the break key has been defined in the configuration file X3.ini. By default the <Q> key is used.
The label called by Onintgo may defined in a routine other than the current one. Its name must then be specified in the instruction Onintgo. This mechanism is used to form general break management routines.
Onintgo without a label deletes the reference to a label in the event of a break; any branching then becomes impossible.
An Onintgo declaration remains valid as long as the routine is running.
As soon as a break management is done in a routine, it also acts in every sub-programme called by Call. However if a sub-programme does not include Onintgoand a break is initiated while it is running, the sub-programme stops, and the calling routine processes the error. If the error management routine ends with the Resume instruction, its execution will restart the calling routine's instructions, those of the sub-programme placed after the last one executed being ignored (for an End, the routine is definitively concluded). It is therefore essential to use Onintgo in a sub-programme called by Call to manage its specific breaks (the sub-programme can then be made uninterruptible).
Break management routines may not in any case terminate a transaction, whether by Commit or by Rollback, since it cannot be at the same location level as the routine that initiated it.
If a transaction is in progress when the break is confirmed, it is automatically cancelled if the routine closes with End. The user will be warned of this.
|
Error |
Description |
|
PAFIC (20) |
Non-existent routine. |
|
ERLAB (39) |
Non-existent label (in the syntax "Onintgo label", a non-existent label is detected when validating the routine). |
|
ERMODE (10) |
expr_nomtrt is not a Char type. |
INTER - RESUME - END - ERRL - CALL
|
|