Scott Moore wrote:
Scott Moore wrote:
UCSD has the form:
close(filename, option)
Where option is a "word":
normal lock purge crunch
Note that a filename (not handle or var file reference) is used, and that "word" as option pretty much requires close to be a compiler built-in statement.
Ugh. So they are not even predefined constants?
Also the filename seems problematic to me. What if several files are opened to the same file name? Then add the problems if directories were changed (as discussed recently in a similar situation). I don't think we want to emulate this ...
I was incorrect. The book calls it a "filename", but I was looking through some old UCSD source programs, and close(file, lock) clearly uses "file" as in "file of text", ie, the file, not its name.
That whole business had its roots in the ultra primitive UCSD file 'system', in which the file size was specified on opening (or seized the remainder of the disk) and the gyrations allowed releasing all, some, none, of the space allocated. USCD files were always some contiguous section of the disc, there was no such idea as allocation units.