📅  最后修改于: 2020-11-04 04:21:44             🧑  作者: Mango
签订合同时,您可能会遇到需要一遍又一遍执行某项操作的情况。在这种情况下,您将需要编写循环语句以减少行数。
Solidity支持所有必要的循环以减轻编程压力。
Sr.No | Loops & Description |
---|---|
1 | While Loop
The most basic loop in Solidity is the while loop which would be discussed in this chapter. |
2 | do…while Loop
The do…while loop is similar to the while loop except that the condition check happens at the end of the loop. |
3 | For Loop
The for loop is the most compact form of looping. It includes the following three important parts. |
4 | Loop Control
Solidity provides full control to handle loops and switch statements. |