www.delorie.com/gnu/docs/oleo/oleo_81.html   search  
 
Buy GNU books!


Oleo

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.1 Boolean Functions

Boolean functions return either a #TRUE or #FALSE value. Most arguments (those labelled bool) are also boolean. If these arguments have any other value instead, the function returns #NON_BOOL as an error.

if(bool, val1, val2)
@findex if If bool is #TRUE, then val1 is returned. If bool is #FALSE, val2 is returned.
and(bool1, bool2)
@findex and Returns #TRUE if and only if both arguments are #TRUE, otherwise returns #FALSE.
or(bool1, bool2)
@findex or Returns #TRUE if either or both arguments are #TRUE, otherwise returns #FALSE.
not(bool)
Returns #TRUE if bool is #FALSE; #FALSE if #TRUE.

iserr(val)
returns #TRUE if val is an error, #FALSE otherwise.
isnum(val)
#TRUE if val is a number, or can be automatically converted to a number. Thus, isnum("12") is #TRUE, while isnum("foobar") is #FALSE.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003