| |
htmlbool
| Format:
htmlbool ( value ) |
Purpose:
Checks whether value, if interpreted as a HTML Boolean argument, is true.
Return Values:
A HTML Boolean is false if:
- it is the Boolean false
- it is the null value
If one of these conditions is fulfilled, the htmlbool() returns false, otherwise true.
Example:
| input: | resulting output:
|
<? htmlbool(true)>
| true
| <? htmlbool(false)>
| false
| <? htmlbool("true")>
| true
| <? htmlbool("false")>
| true
| <? htmlbool("Gwendolyn")>
| true
| <? htmlbool(" ")>
| false
| <? htmlbool("")>
| false
| <? htmlbool(null)>
| false
| <? htmlbool(emptytuple)>
| false
| <? htmlbool(5)>
| true
| <? htmlbool(3.1415)>
| true
|
Tip: The htmlbool() function should prove useful when you
need to redefine a HTML tag with optional arguments of Boolean type.
Example:
| input: | resulting output:
| <def gnarl verbose=null;
if htmlbool(verbose)
>We're gnarling now
</if;
? "gnarl!";
/def>
<gnarl>
<gnarl verbose> |
gnarl!
We're gnarling now
gnarl! |
See Also:
isdecl(), isempty().
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
© 1996-2008 H.E.I. All Rights Reserved.
|