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

Re: XPL: Things executing instead of displaying/printing



A lot of food for thought here. It's not only the
string-_expression_ distinction (which is really the use-mention
distinction), but also the GT/PV distinction. What is the back story on
that? What's GT really doing, since it can execute a subroutine and yet
can't deal with a S/G based on an _expression_? It's an
idiot-savant.

--Harry

Harry:

So, not to worry?

Not if you observe the string-_expression_ distinction in your code. 
"1/2" (string) is NOT interchangeable with 1/2 (_expression_). This is 
not unique to XPL!

If you want an XPL rule of thumb: You can PV a string at the cursor 
position (CMline or text), but you can't GT an evaluated numeric 
_expression_ (Ascii-1 is appended to the result) unless you first 
convert it into a string (>).

Here are more examples:

GT ;*; Puts "1+2"
GT ;*; Puts "1+2"
GT ;*; Puts "1+2"
GT ;*; Puts "1+2"
GT ;*; Puts "3"
GT ;*; Puts "3{Ascii-1}" (garbage)
GT >;*; Puts "3"

--
Carl Distefano
cld@xxxxxxxx



Harry Binswanger
hb@xxxxxxxx