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

PRompt flags, etc.



A couple points of clarification are in order on Tim's message
("Replies to old questions"):

1. The correct syntax for saving the contents of, e.g., Save/Get
1234 to a file is: BX sa %1234,d:\path\filenameQ2 -- not , unless
S/G 1234 happens to *contain* the number identifying the S/G you
want to write to disk. This syntax, BTW, provides a
quick-and-easy procedure for writing an empty (1-byte) file to
disk:
BX sa %01,filenameQ2. If you omit the filename, XyWrite
assigns the name #.SAV, where "#" is the Save/Get number.
Specifying a path but no filename, e.g., BX sa %01,e:\Q2,
generates an error; so if you want to write the file to a
particular path location you *must* also specify a filename.

2. The PRompt flags -- Ascii-12 and piping symbol (|) -- are not
just for "spiffing up" status messages. Rather, they represent
established conventions with specific meanings that users should
observe, especially in XPL intended for "public" use.

The piping symbol applies to messages that solicit user input;
under some color schemes, it will cause the message to appear in
an intense color or at least a different color from normal
PRompt. This usage is illustrated by the following Xy4 status
messages (the number at the left is the error code 
associated with the message):

 3  |Do you want to delete marker? (Y/N)
 35  | Y=yes, N=no, S=stop here, O=one more
 59  |File open--exit anyway? (Y/N)
 88  |Error writing quitn.tmp files--try again? (Y/N) 113  |Do
you want to exit? (Y/N) etc., etc.

The Ascii-12 flag is used to convey an urgent message. In some
cases it calls attention to a condition that signals instability
in the editing session, often best remedied by closing all open
files, quitting XyWrite and starting over again. Examples from
Xy's internal error message register are as follows ({12}
represents the Ascii-12 character):

 9 {12}Disk(ette) is full. 117 {12}Disk full writing to
overflow file--close file
      without saving? (Y/N) 163 {12}Disk is full writing
to overflow file--free up space on drive c:[] 243 {12}Error
loading overlay. 244 {12}Overlay mismatch. 245 {12}Not enough
memory for overlay. 258 {12}Disk is full. Cannot create
overflow file. etc., etc.

In user programming, you can prepend either flag to a textual
PRompt, e.g., , or to a message contained in a
Save/Get, .... You can
also concatenate the flag into the Save/Get beforehand:
>.

The point I'm flogging here is that we're well-advised to adhere
to the specific usages associated with these flags, certainly in
all programming intended for general use. The payoff --
uniformity of look-and-feel between native XyWrite functions and
user add-ons, consistency about what the different message colors
mean, and, especially important, a "style" that's reserved for
urgent messages -- are well worth the discipline. Any
non-standard use should be limited,
IMO, to situations (e.g., games) where there it's unlikely that
the conventional meanings will be diluted.

Finally -- here's the ad -- I wish to note that there's a utility
called ERRCODE in my SmartSet XPL package that gives easy random
access
(via several possible search mechanisms) to any of XyWrite's
1200+ error/status messages. For example, to generate the above
partial list of messages starting with the piping symbol, I simply commanded
ERR |, where  represents a dedicated key used
to launch XPL routines from the U2 user command set file.

3. Where can I get hold of the XXBUG encoding utility?

--------------
Carl Distefano
70154.3452@xxxxxxxx