Record locking

Kenneth Brody kenbrody at bestweb.net
Wed Mar 31 07:35:02 PST 2004


John Esak wrote:
[...]
> I wasn't going to comment on this thread because I had heard it in the FP
> Room and didn't know what to offer toward solving it... but since both of
> you have shown this code...
> 
>     write filename;  close filename
> 
> and say it is a good (and even necessary) syntax... it just has to be said.
> This is patently, and completely _wrong_. Mike, Richard... it has been said
> over and over and over again in this forum and elsewhere. The CLOSE
> statement _does_ a WRITE as part of what it does. There is simply NO need to
> do a WRITE before a close. It is just redundant, not needed, inelegant...
> whatever you want to call it... but please, please don't call it required.
[...]

Actually, my objection is to the CLOSE itself.  Unless you are done
with the file, or have some strange situation where you still get a
"too many open files" error, the CLOSE is simply a time waster.
(Though, admittedly, we're not talking very much time with today's
computers.)

-- 

+---------+----------------------------------+-----------------------------+
| Kenneth |     kenbrody at spamcop.net      | "The opinions expressed     |
|    J.   |    http://www.hvcomputer.com     |  herein are not necessarily |
|  Brody  |      http://www.fptech.com       |  those of fP Technologies." |
+---------+----------------------------------+-----------------------------+




More information about the Filepro-list mailing list