![]() |
Merge Codes (Old 5.0 ^O^P^C^P^O Sequence) |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
Solutions: As many of you know, merge was changed somewhat in the 5.1 release of WordPerfect. During the rewrite, every effort was made to ensure upward compatibility with the old merge commands. However, in order to facilitate the new functionality, some aspects of the way the old merge worked could no longer co-exist. * The first being that ^C no longer showed the remainder of the document from the ^C in context. (We are also looking into this.) * The second, and the purpose of this memo, is regarding the old method of suppressing the automatic "Primary file: " prompt and customizing their own prompt by embedding a ^P^C^P inside ^O's. This is frequently used for document assembly from boiler plates, partial documents, etc. The old format for this was: ^Omessage^Pxxx^Cyyy^P^O, where "message" is the custom prompt, and "xxx" & "yyy" are optionally part of the filename the user will input. If this format is used in 5.1, the file specified is immediately nested and the contents of the new file become part of the ^O prompt. This was due to the enhanced "nestability" of all the merge commands, and making it work the old way would remove a potentially powerful feature. A very simple rearrangement of the codes will cure the problem with documents with this combination of merge commands. By using the following: ^Pxxx^Omessage^O^Cyyy^P, where each component corresponds to the older counterpart, the same effect is achieved. For example, a common use would be to tie a filename to a menu entry: ^O 1 - Menu option 1 2 - Menu option 2 Enter selection & press enter: ^POPTION^C.DOC^P^O where the filenames on disk would be OPTION1.DOC & OPTION2.DOC, and the number part of the filename was supplied by the user. To make this work in 5.1 simply arrange the codes like this: ^P^O 1 - Menu option 1 2 - Menu option 2 Enter selection & press enter: ^OOPTION^C.DOC^P and everything should work fine. of course, this could be accomplished in several different ways with the new merge codes also, two of which are outlined on the next page. Using the mnemonic 5.1 commands, the preceding example would appear identically as: {NEST PRIMARY}{PROMPT} 1 - Menu option 1 2 - Menu option 2 Enter selection & press enter: ~OPTION{KEYBOARD}.DOC~ Again, there is no difference between the two preceding examples. Re-doing the example in other 5.1 commands could result in: {CHAR}key~ 1 - Menu option 1 2 - Menu option 2 Enter selection: ~{NEST PRIMARY}OPTION{VARIABLE}key~.DOC~ which would also eliminate the need to press enter in the earlier examples. Another way (which would be overkill for this particular example, but has obvious potential in cases where the user input isn't, or can't be part of the filename) to accomplish the task would be the following: {CHAR}key~ 1 - Menu option 1 2 - Menu option 2 Enter selection: ~{COMMENT} ~{CASE CALL}{VARIABLE}key~~{COMMENT} ~1~option1~{COMMENT} ~2~option2~{COMMENT} ~~{COMMENT} ~{STOP} {LABEL}option1~{COMMENT} ~{NEST PRIMARY}document.pmy~{COMMENT} ~{RETURN} {LABEL}option2~{COMMENT} ~{DOCUMENT}document.mrg~{COMMENT} ~{RETURN} The advantage to this approach is that different means can be used to process the options. I.E. in option 1, the file is to be processed as a nested primary file. In option 2, the document is simply retrieved, allowing it to contain other merge commands that won't get processed during this merge, and can be subsequently used as primary file later after the document has been assembled from the other options. Or to simply speed up the document assembly process if there are no merge commands that need to be considered. The {COMMENT}'s here are simply to prevent the [HRt]'s used to make it readable from appearing in the final document. |
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. |