[olug] testing order in elif

Obi-Wan obiwan at jedi.com
Wed Mar 12 06:17:21 UTC 2008


> when using elif to test a condition does elif test every condition or just match the first one and do the requested action and quit processing any other part of the elif
. Like linux ipfilter tables

Elif is "else if."  By definition, everything after the "else" (including
the next "if") only occurs if the prevision conditional fails.

-- 
Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com
   The stuff of earth competes for the allegiance I owe only to the
     Giver of all good things, so if I stand, let me stand on the
       promise that You will pull me through.  -- Rich Mullins



More information about the OLUG mailing list