LOOP v2.xx (c) 1995,1996 M&M Corporation Budapest Usage ~~~~~ LOOP.EXE <INIT~STOP[~STEP]> <DOS COMMAND [params]> This equals to for i:=<INIT> to <STOP> step <STEP> do <DOS COMMAND [params]> Examples ~~~~~~~~ (Ex.0) LOOP 0~4 ECHO ~W ~R ~~W ~~R First of all a little test. Try this to find out what the hell these symbols mean. (~W comes from 'WORD', ~R comes from 'REAL') (Ex.1) LOOP 10~15~2 DEL MYTEXT0~W.OLD This will delete the following files: MYTEXT010.OLD MYTEXT012.OLD MYTEXT014.OLD (Ex.2) LOOP 0~9 COPY ORIGINAL.DAT CLONE~W.DAT This will create 10 copy of the file ORIGINAL.DAT named CLONE0..CLONE9.DAT (Ex.3) LOOP 29.99~10~-1E-2 MATHPROG.EXE ~R P1 P2 [...] This may be a scientific application. The LOOP program will call 2000 times MATHPROG.EXE (or anything like that) Btw: that's why I wrote this program. (Ex.4) LOOP 0~9 LOOP 0~9 LOOP 0~9 ECHO ~W~~W~~~W Yeah! Three cycles one in another. This will count from 000 to 999. Nice idea, eh? (Ex.5) LOOP 29.99~10~-1E-2 ECHO MATHPROG.EXE ~R P1 P2 [...] |MORE Just like Ex.3. The difference is >ECHO< and >MORE<. This example will display the command lines instead of having MATHPROG.EXE run. So you can test your long-term loops before executing. Notes ~~~~~ You can use the loop-variable in [params] or even in the DOS COMMAND To do this, use ~W or ~R in command line. The first one cuts off the decimals and rounds the numbers to the closest integer value. The second one uses the whole number in SCI numeric format. See LOOP 1~2~0.1 ECHO ~W ~R for further information. Versions above 2.03 use the 'EXTENDED' variable type instead of 'DOUBLE' or 'REAL'. This means, that the final value of the loop LOOP 0~1E-4~1E-6 becomes 1.00000000000000E-0004 instead of 9.99999999999998E-0005 (double) and 9.90000000002933E-0005 (real). If you want to build up two loops, you might use ~~W or ~~R. The program will change them to ~W and ~R. See (Ex.4) above. The program will check for the right sign of the STEP qualifier. If INIT>STOP then STEP must be negative (<0) and if INIT<STOP then STEP must be positive (>0). If STEP is omitted, ñ1 will be set. Test your loops before executing! This will help you with understanding the LOOP.EXE parameter format. All you have to do is trying ECHO instead of the <DOS COMMAND> you want to use. ECHO will display the command lines that will be called by LOOP.EXE. See (Ex.5) above. LOOP.EXE was written in Turbo Pascal 7.0. If you want to know how it works write to me for the source code (LOOP.PAS). LOOP.EXE is MAILWARE. This means that all users around the world have to write to me at least one E-MAIL containing his/her opinion about this program. Special thanx to József Szûcs for his ideas. I hope he will refer to me in his diploma work. ;-) And, of course, thanx to Joe Foster/STA for correcting my English :) Comments & new ideas ~~~~~~~~~~~~~~~~~~~~ E-MAIL: mark@ludens.elte.hu VISIT MY HOMEPAGE AT: http://ludens.elte.hu/~mark/ SNAIL-MAIL: Molnár Márk 1239 Budapest Dél utca 29. HUNGARY