Not sure if I ever posted this before (might be in the Master Library) but it 
is a very simple function for nesting if statements in a single line command 
pretty much like the old dBase or Excel function. Enjoy:

function iif pCondition, pstatement1, pStatement2
   -- ex. iif(a=b, true, iif(a=c,true, false))
   if pCondition then
      return value(pstatement1)
   else
      return value(pStatement2)
   end if
end iif

Bob S
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to