Execute a given command or command sequence a fixed number of times. The arguments are identical to those of the FORTRAN DO. The DO increment can be negative, so that you can count down - if not specified it defaults to +1 if N2 is greater than N1, and to -1 if N2 is less than N1.
At the top level (i.e.the terminal), the format is slightly different, in that after specifying the DO range you are put into INSERT mode, whereupon you enter the sequence of command lines you wish to see iterated. Use CTRL(Z) to exit this mode -- the file thus generated is then executed as a script. Since there is no syntax checking at INSERT time, it is generally better, for complicated sequences, to first EDIT a command file, and then DO that.
The DO variable may be any integer variable -- the six integer counting variables i,j,k,l,m,n are pre-declared and can be used freely for this purpose.
Examples:
>> do<CR>
Do variable name? n<CR>
First, last, increment ? 1 200<CR>
Enter commands to do, line at a time, CTRL(Z) to finish
insert >> x = 0.5318*x^2-1<CR>
insert >> print x<CR>
insert >> ^z<CR>
-1.000000
-0.4682000
-0.8834234
-0.5849636
-0.8180274
-0.6441361
-0.7793502
:
:
-0.7224417
-0.7224419
-0.7224417