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

Save/Gets in DLG



Steve C. wanted to know what the S/Gs are in the DLG file in XY4
(XYW is the same).
1. There's a list of the 1900-1999 S/Gs in the DLG file.
1900-level S/G's are used for permanently stored variables in the default files 1800-level
S/Gs are used for semi-permanent variables that last for the
current session and are reinitialized on the fly when operating the word processor.
2. S/Gs from 01 to about 35 were used and reused extensively,
usually without much thought to making them firm assignments.
3. S/Gs 40-49 (but mostly 40-45) are used for passing variables
from a dialog box routine to one or more of the common routines at the top of the DLG file.
 F'rinstance, you could put VA$FI into 40, jump to the GrabExt
routine, and get the file extension returned in 41 or 42 (I
forget which). So: 40-45 are generally used for string
manipulation, and the strings are often filenames, paths, or pieces thereof.
4. S/G 60 usually (but not always) is VA$DR, the location of the temp file for overflows.
5. S/Gs 74 and 75, when intialized, are the left and right euroquote chevrons, respectively.
6. S/G 78 is single carriage return; S/G 79 is double.
7. S/Gs 90, 91 have to do with setting defaults and storing them to SETTINGS.DFL or SWSET.DFL.

This is by no means exhaustive.

Hints:
1. You can use DLG file subroutines in your XPL programs. To
force a window open, for instance, use JM(ForceWinOpen). To
stuff the left and right euroquotes into S/Gs 74 and 75, use
JM(Set≪≫) [using the less-than and greater-than characters].
The JM is just a function call -- put it into an
XPL program using PFUN JM on the command line. The common
subroutines are by no means transparent, but some study should be rewarded.
2. You can force a keystroke to uppercase in one step:
{SX99,@UPR({RC})}
This takes the place of {SX99,{RC}} {SX99,@UPR({IS99})}.
It's handy when you're looking for a single keystroke response like (Y/N).