LassoScript Utility
Basics Browse Detail

% Modulo

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

Description

% calculates the value of the left parameter modulo the value of the right parameter and returns the resulting value. Both parameters must be integers.

This symbol does not operate on string values.

Syntax

[Output: Left_Parameter % Right_Parameter]

<?LassoScript
Output: Left_Parameter % Right_Parameter;
?>

[Variable: 'Result'=Left_Parameter % Right_Parameter]

<?LassoScript
(Variable: 'Result') = Left_Parameter % Right_Parameter;
?>

<?LassoScript
$Result = Left_Parameter % Right_Parameter;
?>

Parameters

Required Parameters
Left_Parameter The value which is to be operated upon.
Right_Parameter The modulus of the calculation.

Examples

To output the modulo of two values:

Use the modulo symbol %. The following example outputs the result of 10 modulo 5.

[Output: 10 % 5]

0