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

Re: using an ascii char in a program



Reply to note from ohammond@xxxxxxxx Mon, 14 Aug 2000
15:42:28 +1000

-> What we are trying to do [in XyWrite 3] is, within a
-> program, search for the ascii 10 character

Contrary to a couple of other responses, a simple
Alt-Shift 1,0 does NOT work in Xy3!

To search for Ascii-10, you need to trick XyWrite into
accepting a 1-byte Ascii-10 on the command line. The
following pseudo-code shows one way to do this:

BC se /[255+70+70]{10}/CL CL BD XC

BC, CL, BD and XC are all functions, created with the
command PFUN xx, where "xx" is the desired function.
[255+70+70] is the character produced by holding down
Alt-Shift and pressing 2,5,5. It looks like a blank
space, but isn't; it's a 3-byte character consisting of
Ascii-255 followed by two Ascii-70's (FF). {10} is a
true, 1-byte Ascii-10 -- NOT the character produced by
Alt-Shift 1,0, which is a 3-byte Ascii-10. The easiest
way to produce a 1-byte Ascii-10 in Xy3 is to copy a
known specimen from another file.

Since this code is tricky to produce, I've attached it
to this message as SE10.PM.

That's *what* works. If you want to know *why* it
works, read CTRLCHAR.TXT, available at XyWWWeb.

--------------
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/

Attachment: se10.pm
Description: Binary data