March 2018
Beginner to intermediate
656 pages
20h 9m
English
Control structures available in solidity language are if...else, do, while, for, break, continue, and return. They work exactly the same as other languages such as C-language or JavaScript.
Some examples are shown here:
if (x == 0)
y = 0;
else
z = 1;
do{
x++;
} (while z>1);
while(x > 0){
z++;
}
for(uint8 x=0; x<=10; x++)
{
//perform some work
z++
if(z == 5) break;
}
It will continue the work similarly, but ...