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

  1. ********************
  2.  
  3. FUNCTION Centr
  4.  
  5.    PARAMETERS _temp, _therow, _thechar
  6.  
  7.    * _temp is the string passed to the function
  8.    * _therow is the line length of the line
  9.  
  10.    PRIVATE _thecol, _atemp
  11.  
  12.    IF PCOUNT() = 1
  13.       _therow = 80
  14.       _thechar = CHR(32)
  15.    ELSEIF PCOUNT() = 2
  16.       _thechar = CHR(32)
  17.    ENDIF
  18.    IF TYPE("_temp")+TYPE("_therow")+TYPE("_thechar") != "CNC"
  19.       RETURN("")
  20.    ELSE
  21.       _thecol = _therow / 2
  22.       _atemp = _thecol - INT(LEN(_temp)/2)
  23.       RETURN(REPLICATE(_thechar, _atemp) + _temp)
  24.    ENDIF
  25.  
  26. * End of File
  27.  
  28.