[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: XPL query
- Subject: Re: XPL query
- From: cld@xxxxxxxx (Carl Distefano)
- Date: Thu, 8 May 2003 21:39:41 -0400
Reply to note from Harry Binswanger Thu, 08 May
2003 14:20:46 -0400
> Can you advise on vs. ?
They both read keyboard input, of course. Specifically, they read
the first (and only the first) character or function assigned to the
next pressed key. The difference is that allows the entire key
assignment to execute; allows the first char or func to execute
(unless you trap it in a Save/Get), but discards the rest. For
example, if the pressed key is configured thus:
nn=GT,N,e,w, ,Y,o,r,k
both > and > will save "GT" to Save/Get 01;
> will, additionally, allow "New York" to be written at
the cursor position.
Typically, you use to solicit user input that's typed on the
CMline (because it allows the user to see what she's typing). You
use to solicit the user's response to a menu of choices. It's
appropriate, for example, when you want to trap the key code
() or scan code () of the pressed key. Try running
this little demo several times, responding with different keys,
especially keys with complex key assignments:
XPLeNCODE v2.0
b-gin [UNTITLED]
{<}PR|Press a key{>}{<}SX01,{<}RK{>}{>};*;[cr|lf]{<}SX01,{<}V
A$KC{>}{>}{<}SX01,"You pressed key #"+{<}IS01{>}{>}{<}PR@01{>
}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE
Now run it again after substituting for . See the
difference?
> how do you come up with these undocumented secrets?
You study other people's code. We learned a lot by poring over
XY4.DLG when it first appeared a dozen years ago. But mostly, you
experiment. How else?
--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/