LassoScript Utility
Basics Browse Detail

&& And Logical

Tag Link && And Logical Category Symbol
Type Symbol Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type Boolean Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

&& performs a boolean And operation. Returns True if both parameters evaluate to True or False otherwise.

The left and right parameter to this symbol will be cast to boolean automatically. Integer or decimal values equal to 0, empty strings '', the string 'false', empty arrays, empty maps, and null are cast to False. All other values are cast to True.

Syntax

[If: Left_Parameter && Right_Parameter]
...
[/If]

<?LassoScript
If: Left_Parameter && Right_Parameter;
...
/If;
?>

Parameters

Required Parameters
Left_Parameter Boolean value to be compared.
Right_Parameter Boolean value to be compared.

Examples

To return a result if two conditions are True:

Use the logical And symbol && within an opening [If] tag. The following example checks two conditions (1 < 10) and ('a' < 'z') and returns the contents of the [If] ... [/If] tags since both evaluate to True.

[If: (1 < 10) && ('a' < 'z')]
  Both conditions are True.
[/If]

Both conditions are True.