INTER |
Inter allows you to make a process interruptible from the keyboard or - on the contrary - to make it unable to be interrupted.
Inter [l_expr]
|
Element |
Description |
Restrictions |
|
l_expr |
logical_expression |
None |
# No interruption during this part of the
process
Inter 0: # Nointer and Nointer 1 are
equivalent
# ...
after the process...
# Now, you may interrupt the process
Inter: # Inter1 and Nointer 0
are equivalent.
An Adonix process can be interrupted during its execution by hitting a sequence of keys, which is called a "soft interruption sequence." You will use the sequence of <CTRL> + <ALT> + <Q> keys together for this purpose. The <Q> key is defined by default in the X3.ini configuration file and it can be modified.
When you hit this key, a question box displays the following message: "Execution interrupted on line N ... Do you wish to stop (Y/N)?" If you answer "No" to this question, the process will continue as before. Otherwise, it is interrupted.
A process that has been rendered interruptible can be trapped on a label using the Onintgo instruction when you hit the interruption key. In this case, no message is displayed by Adonix, but the subroutine defined on the label is executed with a possible return to the process.
The interruption management process cannot terminate a transaction - whether by Commit or Rollback - because it cannot be from the same locality level as the process that initiated it.
If a transaction is in progress when the interruption is confirmed, it is canceled automatically (Rollback) - if the process called ends in END. The user will be warned about it.
In a development context, it may be beneficial to interrupt a process either definitively, or in the time it takes to switch to log file mode of the debugger or check a variable's value.
Inter authorizes or prohibits this operation; you will not be able to interrupt a process in Inter 0 mode in this way.
A process is in Inter 0 (uninterruptible) mode by default.
A subroutine launched by Call becomes interruptible if the process that launched it were interruptible. Inter in a subroutine makes it interruptible (or uninterruptible). However, it cannot make the calling process interruptible (or uninterruptible).
It is wise to remain in Inter mode only while developing an application in order to interrupt a process that would be blocked by error, or in order to switch to debugger mode. On the other hand - unless there is an exception - it is risky to allow a final user to interrupt a process at any time. In addition, the permanent scan of the keyboard slows down the execution of the processes.
|
Error |
Description |
|
ERMODE (10) |
The parameter is not numeric. |
NOINTER - ONINTGO - TRBEGIN - COMMIT - ROLLBACK
|
|