home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST318.PRG < prev    next >
Encoding:
Text File  |  1989-08-22  |  825 b   |  41 lines

  1. *******************
  2.  
  3. FUNCTION Dulling
  4.  
  5.    PARAMETERS _astring, _attrib
  6.  
  7.    IF TYPE("_astring") != "C"
  8.       RETURN("")
  9.    ENDIF
  10.  
  11.    IF PCOUNT() = 1
  12.       _attrib = 8
  13.    ELSE
  14.       IF TYPE("_attrib") = "C"
  15.          _attrib = ASC(SUBSTR("_attrib", 1, 1))
  16.       ELSEIF TYPE("_attrib") = "N"
  17.          _attrib = IF((_attrib > 127 .OR. _attrib < 1), 8, _attrib)
  18.       ELSE
  19.          RETURN("")
  20.       ENDIF
  21.    ENDIF
  22.  
  23.    * This function takes a string an returns it with the attribute
  24.    * byte dulled.
  25.  
  26.    PRIVATE _qqq, _gstring    && A lonely nite.
  27.  
  28.    _attrib = IF((_attrib > 127 .OR. _attrib < 1), 8, _attrib)
  29.  
  30.    _gstring = ""
  31.  
  32.    FOR _qqq = 1 TO LEN(_astring) STEP 2
  33.       _gstring = _gstring + SUBSTR(_astring, _qqq, 1) + CHR(_attrib)
  34.    NEXT
  35.    
  36.    RETURN( _gstring )
  37.  
  38. * End of File
  39.  
  40.  
  41.