Macro Questions

DocumentID: 651965
Revision Date: 29-Feb-96 8:29:11 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Solutions: Questions about macros answered by the macro programmer. 1. Why do I run out of memory when I nest several 64K macros? Is there a point at which either the first macro will not run at all or the first macro will run, but the second one will not? Are there some rules of thumb? When nesting, the first macro will remain in memory until it is completely finished. Therefore, you will need enough memory for both the first macro plus the second and so on if you nest within nested macros. WP does use less memory to chain macros because the first macro is done when it chains to the second and is removed from memory. 2. Does it matter how many labels or variables are in a macro? It doesn't make a difference with labels, but variables do use a little memory each. 3. Do different type of variables (i.e., numeric opposed to alpha) or variable names impact memory or performance differently? No, not significantly. 4. Does the macro parse (to describe or analyze) all of the label names before it operates, and do the labels and variables share the same space? Variables are placed in memory but labels are not. Macros are parsed in an interpretive environment as opposed to a compiled environment. This means they are parsed at the time the program is executed. 5. Are there differences in WP running in a DOS environment or a network environment that can impact the performance of a large macro other than reducing the available DOS level memory? No. The only difference is the reduced DOS level memory. 6. Is there any way to determine if a macro will run in available memory, using the macro to measure memory? Generally speaking, the amount of memory a macro will use is the size of the macro minus 30-40 bytes. 7. Do screen prompts compete with labels, variables, and general macro size for macro execution memory resources? No.

Answer:

Details:

Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.