Too Many Open Files (was Re: The CLOSE command)

John Esak john at valar.com
Mon Feb 20 07:00:05 PST 2006


> will casue a problem, I'm willing to let this dog lie.
>  I will say, though that I don't believe people should
> use this technique of re-using the same aliases on
> different files unless they understand what will
> happen.
>
> Jeff Harrison

Well, I understood what would happen and still did the following ... from
years and decades ago. It has never bitten me. I knew both files would be
open,  but it was and is easier to do somthing like this... howver, it *is*
bad programming:



     if:
   then: lookup npio=npio k=ky i=A -nx
     if: not npio
   then: lookup npio=npio at hist k=ky i=A -nx
     if: not npio
   then: return
     if:
   then: aa=npio(1);  ab=npio(2).... 'fill up variables for screen display.
     if:
    then: return


It was always just easier to do it this way, and I've never needed to close
the first file just because the lookup failed. I acknowledge that I'm doing
some bad programming here though.

I agree, now the dog can sleep forever.

JE




More information about the Filepro-list mailing list