Top Navigational Bar

Macro Checking For End Of Document
DocumentID: 665294
Revision Date: 29-Feb-96 8:49:49 PM

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

Problem

Symptoms: How to have a macro tell it's reached the end of a file? Solutions: The end of a file is the only place where there is no code or character. Using the system variables (?variable) to check the code and character at current position the user can determine when the cursor is at this "empty" spot.

IF (?RightCode = 0 AND ?RightChar = "")
// Do whatever
ENDIF

The same expression segment could be used in WHILE - ENDWHILE, REPEAT - UNTIL, etc.. commands.

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.