home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff239.lzh / JGoodies / Mandelbrot / $filenext.jf < prev    next >
Text File  |  1989-08-21  |  1KB  |  40 lines

  1. \ Copyright 1989 NerveWare
  2. \ No portion of this code may used for commercial purposes,
  3. \ nor may any executable version of this code be disributed for 
  4. \ commercial purposes without the author's express written permission.
  5. \ This code is shareware, all rights reserved.
  6. \ Nick Didkovsky 
  7. \ 2/7/89
  8. \ create an indexed string for writing out sequential files to volume PIX:
  9.  
  10. \ NOTE THAT YOU MUST EITHER HAVE A VOLUME NAME PIX: OR HAVE ASSIGNED PIX:
  11. \ TO AN EXISTING PATHNAME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  12.  
  13. anew task_filenext
  14.  
  15. variable curr-filename
  16. variable curr-filecount
  17.  
  18. : init.file.next ( -- )
  19.   0 curr-filecount !
  20.   " PIX:Mandelxxx.IFF" curr-filename !
  21.   cr ." filecount initialized to 0" cr
  22. ;
  23.  
  24. : number>digits ( number -- hundreds tens ones )
  25.   dup>r 999 > if ." FILENUMBER GREATER THAN 999!!!" ABORT then
  26.   r@ 100 / ascii 0 +
  27.   r@ 100 mod 10 / ascii 0 +
  28.   r> 10 mod ascii 0 +
  29. ;
  30.  
  31. : make.next.filename ( -- )
  32.   curr-filecount @ number>digits
  33.   curr-filename @ 13 + c!
  34.   curr-filename @ 12 + c!
  35.   curr-filename @ 11 + c!
  36.   curr-filename @ count type
  37.   1 curr-filecount +!   
  38. ;
  39.  
  40.