[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SETTAB()
 Sets the tab widths for CA-Clipper screen outputs
------------------------------------------------------------------------------
 Syntax

     SETTAB([<cTabTable>|<nTabWidth>]) --> lAccepted

 Arguments

     <cTabTable>  Designates a character string with tab definitions in a
     format as defined below.  Can be a maximum of 32 characters long.

     or:

     <nTabWidth>  Designates (as an exception) an individual numeric
     value for the tab value.  A blank is then used for the tab setting.

     ()  If you call the function without parameters, the tab settings from
     the CA-Clipper console output are uninstalled.

 Returns

     SETTAB() returns .T. when the character string that contains the tab
     settings is installed successfully.

 Description

     Using this function, you can switch to a mode in which CA-Clipper
     console output (with the exception of @..SAY) can interpret tab
     characters.  This function allows tabs to be blanks or any other
     character you choose.  The tab positions and the character used for each
     tab jump are passed in a character string with the following format:

     CHR(tab-pos) + CHR(character) + CHR(tab-pos) + CHR(character)...

     You do not need to specify every tab position within a line.  Any tab
     position that is not specified is worked out as follows:

     <previous Tab Pos.> + <previous Tab Pos.>

     For example, if the first position is 0, the second is 8, and no other
     positions are specified, then the tab positions are 16, 24, 32 etc.

     When you call the function with <nTabWidth>, only one tab width can be
     specified.  All positions are calculated as multiples of this value.  A
     space is used as the tab character.

 Notes

     .  A tab position within a string can never be less than one
        previously designated.  The function returns .F., indicating an
        error.

     .  If the difference between the last and the next to last tab
        positions is 0, or if the last position specified is 0, then
        additional tabs on this line are not taken into account.

     .  The tabs are exclusively for screen output, not for printer or
        ALTERNATE files.

 Examples

     .  Set tabs that expand to spaces with a tab width of 8:

        SETTAB(8)

     .  Set tabs for positions 8, 16, 24, etc.  Use a "." as the tab
        character:

        cTab := CHR(9)
        cTabString := CHR(8) + "." + CHR(16) + "."
        SETTAB(cTabString)

        ? "AAAA" + cTab + "BBB" + cTab + "CCCCCC" + cTab + "DDD"


        * The resulting output: AAAA. . . .BBB. . . . .CCCCCC. .DDD

     .  Format the output in conjunction with LIST:

        USE <file>
        LIST OFF cTab + FIELD1 + cTab + FIELD2 + cTab + FIELD3


See Also: GETTAB() TABEXPAND()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson