| There are three "vars" you can check during script execution in
AmigaDOS, WARN, FAIL, and ERROR. Normally WARN is set if the return
value (completion value returned to AmigaDOS by a program) is 5..9.
FAIL is set if the return value is 10..19 and ERROR is set if the
return value is 20....
Failat adjusts these values (see .1). A good example of why you would
want to use FAILAT is shown in the supplied startup-sequence for a
Workbench 1.3 disk. Before the execution of the StartupII there is a
FAILAT 11. Next is the RUN EXECUTE S:StartupII and then there is a
WAIT 5 MINS command. CLI 2 is started at the RUN EXECUTE... and CLI
1 begins waiting as per its command.
The BREAK 1 C, command found at the bottom of StartupII issues a
control C to process (CLI) number 1 (the startup-sequence).
Since the WAIT is the command running on CLI 1, it FAILS (not an ERROR
because the program didn't fail, but instead the system requested the
program to "stop"). WAIT sets its return value to 10. Normally this
would return an error message of "WAIT failed, return code 10".
But because of the FAILAT 11 command from the startup-sequence, the
FAIL threshold is above 10 and no "FAIL" has occurred. Instead the
"WAIT 5 MINS" instruction which was "running" on CLI 1 stops and the
script file (not 'seeing' a FAIL condition [which would stop the
script]), continues to the next instruction (process communications ala
LOCAL EVENT FLAGS if you will).
An interesting side effect is what happens when you have a 2090A and
you do a RUN EXECUTE DH0:S/Startup-sequence from the floppy boot disk.
Since the CLI is started as number 2. The BREAK 1 C in
StartupII doesn't stop the DH0:S/Startup-sequence, but instead stops
the floppy's startup-sequence. You end up waiting 5 minutes for the
second startup-sequence to complete. Changing the BREAK 1 C to a BREAK
2 C will solve this problem quickly.
Clark
|