[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: What's that XX doin' there where a backslash should be?



Reply to note from Harry Binswanger  Mon, 16 Feb
2004 21:22:08 -0500

> Another anomaly: putting a backslash into a PRompt creates
> funny behavior.
>
> 
>
> doesn't put anything up on the prompt line.

That's because "\" has a special meaning in PRompts. The backslash
plus a  error code translates into the _error_message_
associated with that numeric code when the PRompt is executed. For
example,  reports "There is no command on command line";
 reports "Invalid drive", and so forth. (Issue
ERR /NV to get complete list of error codes and their
associated PRompts.)

Note that this provides a powerful way to capture and report errors
during program execution: >>.

> 
>
> puts up c:XX

As explained above, Editor expects an error code (i.e., a number)
after "\". Since "xy" isn't an error code, Editor returns "XX"
instead of an error message. To put a literal backslash into a
PRompt message, you have to double up on it, i.e., "escape" it with
another backslash: not , but .

--
Carl Distefano
cld@xxxxxxxx