Rotate
If you want to swap two value or wants to rotate value of variables, then this attribute is used.
Syntax:
NOTE: 'Rotate' requires only variables, other values cannot be inserted into it.
Examples:
Sample code to swap two variables using 'rotate' attribute
OUTPUT:
Before Swap: A = 2706 B = 2003 After Swap: A = 2003 B = 2706
Sample code to rotate values of more than two variables using 'rotate' attribute
OUTPUT:
Before Swap: A = 2706 B = 2003 C = true After Rotate: A = 2003 B = true C = 2706
Last updated