Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>setpxlat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SETPXLAT()
 Establishes translation tables for printer output
------------------------------------------------------------------------------
 Syntax

     SETPXLAT([<nASCIIPos|cCharacter>,
        <cPrintCharacter>]) --> lActiveTable

 Arguments

     <nASCIIPos|cCharacter>  Designates the position or the character in
     the key table that is overwritten by the <cPrintCharacter>.  This
     parameter can be designated as a numeric value, between 0 and 255, or as
     an individual character.

     <cPrintCharacter>  Designates the sequence of characters that are
     copied into the key table, starting from the <nASCIIPos> position.

     ()  By invoking the function with no parameters, the existing key table
     is cleared.

 Returns

     SETPXLAT() returns .T. when the key table is active.

 Description

     CA-Clipper normally passes all characters between 0 and 255 to the
     printer, without changing any of the characters.  This always leads to
     problems when the printer is set up with a different font style.  For
     example, a 7 bit printer, which looks for things like German umlauts,
     can cause problems with the IBM extended character set.  Output through
     a key table that you can build yourself is more flexible than a special
     drive module for different printers.

     Imagine the key table as a memory area of 256 bytes.  Memory position 65
     normally contains the character CHR(65).  Using SETPXLAT() you could
     exchange this character for CHR(66).  Thus an "A" sent to the printer no
     longer produces an "A", but a "B".  There are also other ways to
     substitute characters from a particular position.

 Note

     .  The key table is only created at the moment that an exchange
        under SETPXLAT() is requested.  Therefore, memory is not used up
        unnecessarily.

 Examples

     .  Here is the solution for multiple calls of SETPXLAT():

        SETPXLAT(65, CHR(66))            //  B

     .  You can also call the function as follows:

        SETPXLAT("1", "AB")              // 12  AB


See Also: GETPXLAT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson