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

  1. ********************
  2.  
  3. FUNCTION Savearray
  4.  
  5.    PARAMETERS _afile, _aname
  6.  
  7.    * _file is the name of the file to write things to WITHOUT EXTENTION
  8.    * _aname is the name of the array to save to disk.
  9.  
  10.    IF PCOUNT() != 2
  11.       RETURN(.F.)
  12.    ELSEIF TYPE("_afile") + TYPE("_aname") != "CA"
  13.       RETURN(.F.)
  14.    ENDIF
  15.  
  16.    IF EMPTY(AT(".", _afile))
  17.       _afile = _afile + ".ARR"
  18.    ENDIF
  19.  
  20.    PRIVATE _ext, _qaz
  21.  
  22.    _ext = LTRIM(TRIM(STR(LEN(_aname))))
  23.    STORE "" TO AAAA&_ext.
  24.    FOR _qaz = 1 TO LEN(_aname)
  25.       _ext = LTRIM(TRIM(STR(_qaz)))
  26.       STORE _aname[_qaz] TO AAAB&_ext.
  27.    NEXT
  28.    SAVE ALL LIKE AAA* TO &_afile.
  29.    RETURN((DOSERROR() = 0) )
  30.  
  31. * End of File
  32.  
  33.  
  34.