Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - labeldef label declaration block http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 labeldef            Label declaration block
------------------------------------------------------------------------------
 Syntax
   labeldef <symbol> [<scope>]
      height   := <uHeight>
      width    := <uWidth>
      margin   := <uMargin>
      horiz_sp := <uHorizSpace>
      vert_sp  := <uVertSpace>
      across   := <uAcross>
      line     := <cLine>
   enddef

 Arguments
   <symbol> is the symbol name of the label structure.

   <scope> is the scope of the label.

   <uHeight> is the number of printable lines on the label.

   <uWidth> is the number of column spaces on the label.

   <uMargin> is the left margin setting for the label.

   <uHorizSpace> is the number of columns between labels.

   <uVertSpace> is the number of lines between labels.

   <uAcross> is the number of labels across a sheet.

   <cLine> is a character expression for each line in the label.

 Description
   The labeldef keyword initiates a label declaration block. The contents
   of the block determines the layout of a label to be used with the
   label form command. The labeldef block functionally replaces the
   xBase label (.lbl) files.

   More than one line statements are possible, but at least one must be
   specified. The number of line statements must match the number
   specified in height (extra lines are ignored).

   +------------------------------------------------------------------------
   |
   | PAGE     |---------------------------across---------------------------|
   |
   |--margin--|--------width----------|
   |          +-----------------------+            +-----------------------+
   |          |   |           LABEL 1 |            | line (1)      LABEL 2 |
   |          |   |                   |  horiz_sp  | line (2)              |
   |          |   |                   |------------| line (3)              |
   |          |   |height             |            | line (4)              |
   |          |   |                   |            | line (5)              |
   |          |   |                   |            | line (6)              |
   |          |   |                   |            | line (7)              |
   |          +-----------------------+            +-----------------------+
   |                     |
   |                     |vert_sp
   |                     |
   |          +-----------------------+            +-----------------------+
   |          |               LABEL 3 |            |               LABEL 4 |
   |          |                       |            |                       |
   |          |                       |            |                       |
   |          |                       |            |                       |
   |          |                       |            |                       |
   |          |                       |            |                       |
   |          |                       |            |                       |
   |          +-----------------------+            +-----------------------+
   |

 Example
   #define EXAMPLE_KEYWORD
   #include example.hdr

   dbfdef sTest static
      char(10) firstname
      char(15) lastname
      uint(3)  age
      logical  sex
      dbl(9:2) balance
      date     due
      memo     notes
   enddef
   
   labeldef sLabCust
      height   := 5              // height of label
      width    := 50             // width of label
      horiz_sp := 1              // lines between labels
      vert_sp  := 1              // lines vertically
      margin   := 0              // margin
      across   := 3              // number of labels
      line     := sTest->firstname
      line     := sTest->lastname
      line     := str( sTest->balance, 9, 2 )
   enddef
   
   proc Test_labeldef
   endproc

   proc main
   Test_labeldef()
   endproc

See Also: label form

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