| I don't know of an easy way to do this. The problem is that the vertical bar
character isn't a single character value. You'd need to store a terminal
escape sequence that selects the graphic character set, draws the bar, then
resets the ordinary ASCII set.
A suitable escape sequence is: ESC ) 0 SO x SI
Where ESC is ASCII code 27, SO is ASCII code 14 and SI is ASCII code 15.
'x' is the character code that maps to a vertical bar in the graphics character
set. Note the third character is zero, not the letter O.
Note this only works on VT terminals, and won't work on printers. If you |
need it to work on printers, or non-VT terminals, you're stuck with the |
ASCII | character, which gives acceptable, if not perfect, vertical lines, |
as shown to the right of this paragraph! |
Scott
|
| � The problem is that the vertical bar character isn't a single
� character value.
Wait a minute ... there's still one question coming to my mind:
Why does MERGE_LINE ignore 'multiple' characters? I mean: they're *in*
the WPS file holding the boilerplate. Aren't they *just* characters,
interpreted by the VT. MERGE_LINE should read <ESC> and write it out to
the outputfile. So, the MERGE_LINE function does something to these
characters (ignore them?). I'm afraid I don't fully understand this one.
Is there something else to explain about this one? Maybe from a
MERGE_LINE developer?
Thanks,
Sjaak.
|
| Hi,
>> Why does MERGE_LINE ignore 'multiple' characters? I mean: they're *in*
>> the WPS file holding the boilerplate. Aren't they *just* characters
Yes, they're just characters. However, I wouldn't assume that .WPL files
store them in the same way as the VT escape sequence. Also, I'm not sure that
doing a cut-n-paste between a TDE and an ordinary editor window would "pick up"
all the necessary information. My point is, I'm not convinced the correct
sequence was ever given to MERGE_LINE.
The following (primitive) code will get the vertical bar sequence into an
ALL-IN-1 symbol, just so you can experiment:
$ esc[0,7] == 27
$ so[0,7] == 14
$ si[0,7] == 15
$ get mysym = esc + ")0" + so + "x" + si + "x"
$ allin1
(then on an ALL-IN-1 menu)
<get #x = cli$mysym
<get oa$display = #x
which will display the vertical bar, followed by 'x'. Note you have to have an
"ordinary" character after the SI, or ALL-IN-1 symbol processing cuts it off
the end of the string (sigh...).
>> MERGE_LINE should read <ESC> and write it out to the outputfile.
In a perfect world, yes, but:
>> So, the MERGE_LINE function does something to these characters (ignore them?)
Almost; the following:
<OA$MRG_TTOUT
<GET OA$FUNCTION = "MERGE_LINE " #x
displays ")0|x". Note the "|" is the correct vetical bar, I'm just simulating
it here for simplicity. So MERGE_LINE processes the SO and SI, but ignores the
ESC. The only reason the bar prints is that the character set designation
performed by "ESC )0" is still valid from before (read a VT manual for more
info on this).
However, if you now do:
<get #y = "x" #x
So that there is an "ordinary" character before the ESC, then do
<GET OA$FUNCTION = "MERGE_LINE " #y
the display will show "x|x", which is correct, and what you want (as long as
you have ordinary charactes either side of it). So all you need to do is find
a suitable way to get the correct sequence to the MERGE_LINE command (if my
primitive test example isn't good enough!). Before anyone syggests it, FN$CHAR
doesn't work. I tried it.
Note you can optimise this a bit: you only need "ESC )0" once, at the beginning.
After that you just need the "SO x SI" to print a bar.
Your only problem now is, this still won't work with printers...
Scott
|