home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / CLIPPER / PKB / CLS2.PRG < prev    next >
Text File  |  1993-01-30  |  1KB  |  33 lines

  1. /*┌──────────────────────────────────────────────────────────────────────┐
  2.  ▌│                                                                      │
  3.  ▌│ Program Name: CLS2.PRG          Copyright: Gallagher Computing Corp. │
  4.  ▌│ Date Created: 01/30/93           Language: Clipper 5.0               │
  5.  ▌│ Time Created: 16:10:51             Author: Kevin S Gallagher         │
  6.  ▌│ c:/brief/clipper.src                                                 │
  7.  ▌└──────────────────────────────────────────────────────────────────────┘
  8.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀           */
  9.  
  10.  
  11.  
  12. #define COORDS  0,0,MaxRow(),MaxCol()
  13.  
  14. FUNCTION CLS2(nAttr,cPattern)
  15.     LOCAL ShowPat:= "", PatLen, jj
  16.     nAttr   :=IF(ISCOLOR(),nAttr,7)
  17.     nAttr   :=IF(EMPTY(nAttr),7,nAttr)
  18.     nAttr   :=IF(VALTYPE(nAttr)!="N",VAL(nAttr),nAttr)
  19.     cPattern:=IF(EMPTY(cPattern), " ",cPattern)
  20.     PatLen  :=LEN(cPattern)
  21.  
  22.     IF PatLen >= 18
  23.         Return(.F.)
  24.     ELSE
  25.         FOR jj = 1 to PatLen
  26.             ShowPat +=SUBSTR(cPattern,jj,1)+CHR(nAttr)
  27.         NEXT
  28.     ENDIF
  29.     restscreen(COORDS,                                                     ;
  30.     replicate(ShowPat,IF(PatLen=1,(MaxCol()*2)*MaxRow(),MaxCol()*MaxRow())))
  31. Return(.T.)
  32.  
  33.