Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

FAILAT Internal
Purpose: To instruct a command sequence to fail if a program gives a return code greater than or equal to the given value.
Format: FAILAT [<n>]
Template: RCLIM/N
Path: Internal
Commands indicate that they have failed in some way by setting a return code. A nonzero return code indictaes that the command has encountered an error of some sort. The return code, normally 5, 10, or 20, indicates how serious the error was. A return code greater than or equal to a certain limit, the fail limit, terminates a sequence on non-interactive commands (commands you specify after RUN or in a script).

You may use the FAILAT command to alter the fail limit RCLIM (Return Code Limit) from its initial value of 10. If you increase the limit, you indicate that certain classes of error should not be regarded as fatal and that execution of subsequent commands may proceed after an error. The argument must be a positive number. The fail limit is reset to the initial value of 10 on exit from the command sequence.

If the argument is omitted, the current fail limit is displayed.

Example 1:

3.OS4:> FAILAT
Fail limit: 10

Example 2:

Assume a script contains the following lines:

COPY DF0:MyFile to RAM:
ECHO "MyFile being copied."
If MyFile cannot be found, the script will be aborted, and the following messages will be displayed: COPY: object not found
COPY failed returncode 20:
However, if you changed the return code limit to higher than 20, the script would continue even if the copy fails. For example, if you changed the script to read: FAILAT 21
COPY DF0:MyFile to RAM:
ECHO "MyFile being copied."
Even if MyFile cannot be found, the script will continue, and the following messages will be displayed: COPY: object not found
MyFile being copied.
See also: ECHO, EXECUTE, RUN


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.


Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.