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

Re: Stack question



** Reply to message from Harry Binswanger  on Wed, 14 Jan 2004
13:09:49 -0500

> when I hit the key I've assigned for XH,BC,$S

This assignment makes more sense:
 nn=Q5$SBC$S
Think about it: Q5 to handle the Microlytics speller; $S to Stack whatever
command is on the CMline before you wipe it out; BlankCommand_line; $S to
(potentially) peruse the Stack. If you're using the new code to trap a
situation where MeNus are open, then you don't need XH (which barely works
anyway). No commas -- saves 4 bytes of memory -- you remember Everett Dirksen,
I'm sure: "a dollar here, a dollar there, pretty soon..."

> I get:
> "Cannot compare a number to string... "

So do I. That alternative was written a long time ago, and it worked then.
But I subsequently enabled both XyWin and NotaBene in the main code. The
routine got renumbered and et cetera -- but those alternatives were never
adjusted.

So I've seized this opportunity to look again at the main code and make some
economies. I've deleted STACKXYW.ZIP at XyWWWeb, and replaced it with
"stack32a.zip", the current version. Fixed alternative multi-function call
code is now in STACK.DOC. Get it at:

 http://holmgren.home.acedsl.com/stack32a.zip

and I also refreshed the whole XY4.DLG file:
 http://holmgren.home.acedsl.com/XY4DLG.ZIP

You should install the new code regardless, because it is better and adds one
safeguard. But I would say, in principle, the $D-type solution is simpler and
leaves less to chance (you don't have to manually edit any code). It doesn't
need to be function $D, it can be @D or @A or $Z or whatever.

Examples (let's stick with "D" throughout):
--------
If you use a $-type S/G ($D), you must add a frame to DLG:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5$D}} CursorDown[cr|lf]{002}[GT_][LD_]{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

If you use an @-type S/G (an "ordinary" S/G, @D), you could just add a line to
STARTUP.INT:

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SUD,[GT_][LD_]{>};*;[cr|lf]
-nd
XPLeNCODE

I suppose you could use an &-type LDPM S/G (&D), but that would be a bit silly.
Or you could recode the whole thing in XyBasic.

Note finally that if you go the $D route, that you have to change S/G 621 in
frame stack.int:
 ;*;
and you have to change your KBD assignment for Cursor Down:
 80=$D

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------