Published on : August 19, 2020
Title : if.int
Purpose : The Condition to check given variable data type is an Integer type.
Syntax : [if.int variable_name]
//** Do something if given variable name is an Integer type **//
[/if.int]
Input Parameters :
variable_name : The variable name which we want to check that given variable is an integer type
Return Value : It return boolean value (true/false)
Example 1 :
Code : [template.customer_age = 35 /]
[if.int template.customer_age]
Given variable is an Integer type.
[/if.int]
Output : Given variable is an Integer type.
Description : In the example, define variable customer_age is stored value is an type Integer, then condition will get satisfied hence logic inside will get executed.
Example 2 :
Code : [template.value_1 = “abc”/]
[if.int template.value_1]
Given variable is an Integer type.
[/if.int]
Output :
Description : In the example, define variable value 1 stored value is an string type , then the condition will not get satisfied hence logic inside will not get executed.