[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4934.0. "What is the purpose of FAILAT in life ?" by TRUCKS::BUSSINK_E (Switzerland 700th, D-2) Tue Jul 30 1991 06:03

    How does the Workbench 1.3 command FAILAT work ? what is it's purpose
    in life. What is the number that follows the FAILAT ?
    
    							Erik
    
    Note - I'm sorry to ask this here, but my manuals are ~600 miles
    	   from here. 
T.RTitleUserPersonal
Name
DateLines
4934.1FAILAT ~= ON ERROR, ON WARNINGTLE::ALIVE::ASHFORTHLord, make me an instrument of thy peaceTue Jul 30 1991 09:027
FAILAT tells AmigaDOS what level of error any following commands should "fail
at." The following number is the severity level. My manuals are only 43 miles
away, but unfortunately I still can't read them at that distance...must be
gettin' old-

Cheers,
	Bob
4934.2WARNing FAIL ERROR Will Robinson!SDOGUS::WILLIAMSTOPGUNTue Jul 30 1991 15:4935
    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