Thank you all very much,
I appreciate and agree with comments about good practice.
But
I will be doing lots of opeming and closing of files and
this routine will be buried many levels deep and for me personally I like to have a "what cannot happen just happened" warrning.
Thank you Prattarat -...
Hi
Thanks for the replies
I did try setting fp to NULL after a close
and then checking for null before the next close
This may work if they are in line however with my call where it seems to have no effect - it isnt setting fp to Null in the calling routine so if the calling routine calls again...
Hi All
Sorry this question is paranoid - but i am!
Since this routine will be deep in the code I want it bomb proof ( even Me proof )
As part of a bigger project I have written a trivial
routine to close a file. There is other stuff in it but I reduced it to minimum to verify where problem is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.