For
For[var, list] ... End
For[var, list] ... End executes the script at ... once for each element in list. In each iteration var is defined as the next element in list.
| Example | in | out |
|---|---|---|
Executes the script at ... exactly 10 times. |
For[ii, Range[10]] |
|
The sum of the elements in list computed. |
list:={1,3,5,7} |
list = {1,3,5,7} |
| The list must remain unchanged during the iterations. | list:={1,3,5,7} |
|