Top Navigational Bar

Macro {MID} Command Returns 2~~ To Screen If
DocumentID: 651204
Revision Date: 29-Feb-96 8:29:05 PM

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

Problem

Symptoms: The customer had entered the following macro segment:
{ASSIGN}fullpath~{SYSTEM}path~{SYSTEM}name~~
{ASSIGN}adrive~{MID}fullpath~0~2~~
{IF}"{VARIABLE}fullpath~"=""~
{PROMPT}There is nothing in there.~{WAIT}20~{QUIT}
{ELSE}{IF}"{VARIABLE}adrive~"="A:"~
{PROMPT}In the a drive~{WAIT}20~{QUIT}~
{END IF}{END IF}
If he had not saved the document and fullpath ended up blank, then 2~~ would be put onto the screen. I believe this has something to do with trying to take a {MID} of an empty variable. I had him use a space before the ending tilde on the assign he was using and then a space in the {IF} he was using to see if it was blank. That cleared up the problem. Solutions: This has been fixed in the interim release after 6/29/90. Answer as given by programmer: "Doing a macro command {MID}x~0~2~ when the variable "x" does not exist was sending the 0~2~ through when they should have been ignored."

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.