Scott Rossi wrote:
> 
> Can "true" and "false" be converted into their numeric equivalents (1/0)?

The perfect chance to post one of my favorite handlers. Wish I'd written it:

function whichOne var,fld1,fld2 
-- from a handler by Tony Root
-- Handles a case where you need to return one value if your key is
empty, another if not.

  return (item offset(char 1 of (var = empty),"tf") of quote & fld1
&","& fld2 & quote)
end whichOne

You can adapt it to almost anything:

function whichOne var -- pass true or false
  return (item offset(char 1 of (var="true"),"tf") of "1,0"
end whichOne
-- 
Jacqueline Landman Gay         |     [EMAIL PROTECTED]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to