Top Navigational Bar

Advanced Macro Commands - {RETURN} Command Co
DocumentID: 651407
Revision Date: 29-Feb-96 8:29:07 PM

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

Problem

Symptoms: I have found in Appendix K of the reference manual, page 913, under the heading for the {RETURN} command, there is a sentence that reads: "If there is no {CALL} or {CASE CALL} to return to and the macro file containing this command is nested, {RETURN} signals the macro to return to the file from which it was nested." On page 940, on the bottom of paragraph three starting from the top we read: "Because execution is automatically returned when the nested macro has finished, you do not need to place a {RETURN} command at the end of a nested macro." This is not only contradictory but also I found that when the nested macro is doing a search as part of the routine, and the search fails, it does not automatically return to the original macro but it quits the macro without returning to the original macro that called it. I had to place an {ON NOT FOUND}{RETURN}~ command at the beginning of the nested macro so it would return to the original macro and continue execution. Solutions: There is nothing wrong with either quotes from the manual. Each statement expresses in part what the {RETURN} command can do and what the {RETURN} command will do in different circumstances. The {RETURN} command can be used to send the execution back to the macro that called it at any point. BUT, (second statement) if there is a point in execution that the macro is not told where or what to do next, it will ASSUME that execution should be transferred to the macro that called it. This is the same principle with the {RETURN} command, "If there is no {CALL} or {CASE CALL} to return to" execution is assumed to go back to the parent macro.

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.