Re: Hexidecimal Characters
Posted in 1995
In article <3lh98i$krh@newsbf02.news.aol.com> keithpc@aol.com "Keithpc" writes:
> Is there a way to send Hexidecimal Control Characters to a printer in 4GL?
> I don't have the option of ASCII and I would prefer to store them in a
> database but I don't know how to do that either.
A quick peruse of the manual suggests that the ASCII function only works
with a numerical expression. If it will work with a program variable, it
becomes possible to hold values in the database in the following (approx)
way:
create table printers
(
pr_code char( 10 ),
pr_desc char( 30 ),
pr_bold char( 15 ),
pr_6lpi char( 15 ),
pr_8lpi char( 15 ),
...
...
)
and load up the table so that you can then use a library function
to pick up the contents of the column & turn it into the correct ascii
sequence using a 'WHILE' loop. I would envisage the info being held in the
following format:
\\E = escape
\\033 = escape
A = A
You would have to settle on a fixed layout for unprintables, but this would
allow you to hold all the info in the database in a meaningful form
and turn it into the correct sequence, so long as you hve the required
printer code.
If it's a simple problem, this is a steam hammer to crack a nut, but if it's
going to be endemic in a big system maybe it's worth thinking about.
--
============================================================================
Sally Woolrich | This mail contains my personal
sally@excelsis.demon.co.uk | views not those of my employer!
============================================================================