'repeat' numrep cmd_rep

This line uses the Editor repeat command to repeat the command input by the user by the repetition factor also input by the user.

Quote marks surround only the repeat command, and not the arguments to that command. The numrep and cmd_rep variables on this line yield the values stored in them as arguments to the repeat command. Had the two variables been enclosed inside the quotation marks, the variable names themselves, and not the values they contain, would be supplied to the repeat command.

The Editor repeat command offers you one way to repeat a single command for a known number of times. You can also use various forms of the REXX DO command to cause several commands to loop, and to include additional macro processing inside the loop itself. See Related Tasks below for more information.


Using Loops in Editor Macros
repeat Command