n Lasso a tag named as [Define_Constant], which will define a constant along with its value of any data type, which will directly access in the file by simply
use its constant name like 'define' in PHP.
It will not allow you to modify its value unless its value first coiped to a variable. So, you can use this in your config file for define some constants that will be used in your project.
Syntax:
[Define_Constant: 'ConstantName', 'Value'] //In Tag
Define_Constant('ConstantName', 'Value'); //In Script
Example:
<?LassoScript
Define_Constant('USER_NAME', 'Admin'); //For define a constant
USER_NAME; //For access its value
?>
OutPut:
Admin
Using Variable in value:
Example:
<?LassoScript
Var: 'ModValue' = 'Admin';
Define_Constant('USER_NAME', $ModValue); //For define a constant
USER_NAME; //For access its value
?>
OutPut:
Admin
Thanks
Eliza
Recent comments