Re: Hexidecimal Characters
Posted in 1995
alan@po.den.mmc.com (Alan Popiel) wrote: > > } Subject: Hexidecimal Characters > } Date: 31 Mar 1995 11:05:38 -0500 > } Reply-To: keithpc@aol.com (Keithpc) > } Organization: America Online, Inc. (1-800-827-6364) > } > } Hello all, > } > } 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. > } > } Any and all help will be greatly appreciated. > } > } Keith Howard > } Dir, CMS Technologies > } Reynolds+Reynolds > > What control characters do you want to send? You can use the 4GL ASCII > command to generate any necessary characters, tho' you must specify the > value in decimal instead of hexidecimal. For example, > > LET cont_code = ASCII 27 { escape, hex 1b; cont_code is CHAR(1) } > PRINT cont_code, "M0" { print ESC M 0, assuming this is in a report } > > Regards, > Alan > +---------------------------+-----------------------------------------------+ > | R. Alan Popiel | Internet: alan@den.mmc.com | > | Lockheed Martin, SLS | Voice: 303-977-9998 | > | P.O. Box 179, M/S 3810 | Standard disclaimers apply. Cutesy ones, too. | > | Denver, CO 80201-0179 USA | Your mileage may vary. Void where prohibited. | > +---------------------------+-----------------------------------------------+ > Included in the Power-4gl toolkit is a function which converts a string with control character representations to a string with actual control characters. For example, if you want the string to contain the three characters 'escape', 'ctrl-M' and a normal 'Q' then you would send "^[^MQ". This format for representing control characters is quite standard and is easy to store in a database table. If you want this function, or more information about the Power-4gl integrated function library (extending Informix-4gl), send word. John H. Frantz frantz@centrum.is --