Rotate
If you want to swap two value or wants to rotate value of variables, then this attribute is used.
Syntax:
rotate : (variable1 , variable2, variable3)Examples:
Correct Syntax:
rotate : (val1 , val2 , val3)
or
rotate : (val1 , val2)
------------
Wrong Syntax:
@ you need to insert all value within round-brackets
rotate : val1 , val2
or
@ rotate requires at least two variables
rotate : (val1)
or
@ rotate expects only variables, no
@ other type of tokens are allowed
rotate : (val1, "SRON", val2)Sample code to swap two variables using 'rotate' attribute
OUTPUT:
Sample code to rotate values of more than two variables using 'rotate' attribute
OUTPUT:
Last updated