Kyocera TASKalfa 4501i PRESCRIBE Commands Technical Reference Manual - Rev. 4. - Page 64
MCRO Command
View all Kyocera TASKalfa 4501i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 64 highlights
Chapter 3 Macros MCRO Command The MCRO command assigns a name to the sequence of PRESCRIBE commands that follows, until the ENDM (END Macro) command appears. Thereafter, the entire sequence of commands can be executed by specifying the assigned name in a single CALL or AMCR (Automatic MaCRo) command. The MCRO command has the following format. MCRO name[ dummy sign[, comment]; The name of a macro can be any length but only the first four characters are recognized by the PRESCRIBE command language. Any distinction between upper and lowercase letters is also ignored. For example, the following macro names are all the same: ABCD abcd ABCDE Abcdxyz The name must start with a letter, but the other characters can include digits and special symbols such as hyphens. For example, F-1 and GRY2 are valid macro names. The dummy sign (the default is the percent sign) indicates dummy parameters in the body of the macro. Dummy parameters enable you to place different variables when the macros are called. By using dummy parameters the same macro will execute differently according to the values given on the CALL command. Dummy parameters are written by writing the dummy sign followed by a number: %1 for the first dummy parameter, %2 for the second dummy parameter, and so on up to a maximum of 19 dummy parameters. The same dummy parameter can be used any number of times. Values are assigned to dummy parameters when the macro is called by the CALL command. You do not have to specify the dummy sign in the MCRO command unless you want to use a dummy sign different from the percent sign or want to specify a comment. The printing system ignores the comment. A useful comment would be a list of the meanings of dummy parameters. In particular, a macro can contain the CALL command, permitting one macro to call another. Macro calls can be nested in this way up to a maximum depth of 20. If the body of the macro contains TEXT, RTXT, or CTXT commands and these have dummy parameters, the enclosing quotation marks should be included in the macro call, not in the macro definition. This enables strings containing commas, semicolons, consecutive spaces, apostrophes, and quotation marks to be printed. If a macro with the same name has already been defined, the new definition is ignored. To redefine a macro, you must first delete the old definition with the DELM (DELete Macro) or DAM (Delete All Macros) command, or by switching the printing system power off. There is no particular limit on the length of a macro. The maximum number of macros that can be defined is limited only by the amount of the available memory in the printing system. Each command in a macro is limited to 255 characters in length. 3-2