A single Abuild.interface
conditional must
appear in parentheses after an if
or
elseif
statement. The conditional may be a
simple boolean variable reference, or it may be a call to any of
the provided conditional functions, each of which returns a
boolean value. Conditional functions may be nested as needed.
Any boolean argument described below may a be function call or a
simple boolean variable reference, thus allowing function calls
to nest. The following functions are defined:
and
(bool1
, bool2
)Returns true if both expressions are true and false otherwise.
or
(bool1
, bool2
)Returns true if either value is true.
not
(bool
)Returns true if the given value is false, or false otherwise.
equals
(scalar1
, scalar2
)
Returns true if the two scalars contain the same contents.
The two values must be the same type. The
equals
function may not be used to
compare lists.
matches
(string
, regex
)
Returns true if the string value matches the given
Perl-compatible regular expression. Regular expression
matches may be applied only to strings. Note that
matches
returns true if the regular
expression matches the whole string. If
you need to do a partial match, you must add
.*
at the beginning and/or end of the
expression.
contains
(list
, scalar
)Returns true if the given list contains the given scalar value. The scalar must have the same type as the list.
containsmatch
(string-list
, regex
)
Returns true if the given list contains any elements that
match the given Perl-compatible regular expression. The list
must be a list of strings. As with
matches
, the regular expression must match
the entirety of some member of the list.