home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / FFB.ZIP / FFUTILS.ARC / ZIMMER.ARC / BOXTEXT.SEQ < prev    next >
Encoding:
Text File  |  1987-12-29  |  1.2 KB  |  43 lines

  1. \ BOXTEXT.SEQ   Some simple boxes around text.          by Tom Zimmer
  2.  
  3. 0 constant tx   0 constant ty
  4. 0 constant bx   0 constant by
  5.  
  6. : box           ( left top right bottom --- )
  7.                 =: by =: bx =: ty =: tx
  8.                 tx ty at
  9.                 218 qemit
  10.                 bx tx - 1- 0 max 0
  11.                ?do      196 qemit
  12.                 loop    191 qemit
  13.                 tx by at
  14.                 192 qemit
  15.                 bx tx - 1- 0 max 0
  16.                ?do      196 qemit
  17.                 loop    217 qemit
  18.                 by ty 1+
  19.                ?do      tx i at 179 qemit
  20.                         bx i at 179 qemit
  21.                 loop    ;
  22.  
  23. : (.box)        ( x y --- )
  24.                 r> dup 2+ >r x@
  25.                 >r over r@ c@ + 3 + over 2+ box
  26.                 tx 1+ ty 1+ at bl qemit r> count type bl qemit
  27.                 bx by 1+ at ;
  28.  
  29. : .box"         ( x y text --- )
  30.                 compile (.box) here x, ," ; immediate
  31.  
  32.  
  33. \s
  34. : boxsample     ( --- )
  35.                 20 2
  36.                 do      i 2* i .box" Ziping along!"
  37.                 loop
  38.                 10 10 .box" hello this is a sample of BOXED TEXT"
  39.                 20 15 .box" Here is even more text!!" ;
  40.  
  41. boxsample
  42.  
  43.