Top Navigational Bar

Numeric Expression Can Only Contain Integers
DocumentID: 612154
Revision Date: 29-Feb-96 1:35:25 PM

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

Problem

Symptoms: A customer would like a macro to return the cursor to the same line it was on before the macro started. To do this, the customer used the {SYSTEM}line~ command to assign the line value to a variable. Next, the customer divided the variable by 1200 to convert the value to inches and then used that value with the Advance code. However, WP rounds the advance value to the nearest inch. For example, if the value of {SYSTEM}line~ was 1800, dividing it by 1200 should return the value 1.5. However, the value returned is 1. Solutions: The program is working as designed. On page 765 of WordPerfect 5.1 Reference manual dated 10/91, the first paragraph of the Numeric Expressions section explains that "...values must contain only integers (or variables which contain integers)." The subsection on the divide symbol says that only an "...integer quotient" is returned.

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.