is_set
Summary
Returns TRUE if the value of the provided variable is set.Usage
is_set( target )
Parameters
Name | Type | Description | Required |
---|---|---|---|
target | any | The target variable. | Yes. |
Returns
TRUE or FALSE.Description
This operator checks if the value of the target parameter is a non-false value (meaning that it is set). If it is, the operator will return TRUE, otherwise FALSE will be returned. Please note that this operator does not take an input parameter.
Examples
Example 1
{if is_set( $whatever )} It is set. {else} It is not set. {/if}
The following output will be produced: "It is not set." - because $whatever is not declared and/or defined.
Example 2
{def $whatever='We need more rocket fuel!'} {if is_set( $whatever )} It is set. {else} It is not set. {/if}
The following output will be produced: "It is set.".
Balazs Halasy (05/02/2004 12:35 pm)
Balazs Halasy (06/05/2005 7:28 am)
Comments
There are no comments.