Random impressions as I read van Vliet ever more closely
chris hermansen
clhermansen@gmail.com
Tue Jun 2 22:04:43 GMT 2026
Greetings everyone,
Now with both van Vliet's code (and not-code) in one hand and his book in
the other, I am starting to really notice some interesting things...
One thing that kind of surprises me is his open(ref file file, string idf,
channel chan) int - it returns zero when the open "succeeds" and non-zero
otherwise, which sounds good at first look, but then I notice that:
1. it only fails and returns a non-zero value when the attempt to find a
system file that matches idf fails
2. if the caller opens a file for reading that is not readable, it DOES
NOT fail; similarly, if a file is opened for writing that is not writable,
it DOES NOT fail.
Taking this a bit further, if I attempt to open a file for reading that is
not readable and open returns a zero value, I then have to query
get_possible on that file. Similarly for put_possible, bin_possible,
compressible, reset_possible, set_possible, reidf_possible.
van Vliet also provides for backspace_possible.
I'm not confident that I can (for example) open a system file for reading
that is not readable and then leave it open, which is the behaviour
indicated by van Vliet (and I guess the RR), later permitting it to be
closed. It seems to me that the POSIX open routine will fail in this
situation and the Algol 68 file should therefore not be considered open.
Am I missing something here? Thanks for any and all pointers provided...
--
Chris Hermansen · clhermansen "at" gmail "dot" com
C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/algol68/attachments/20260602/8603fa81/attachment.htm>
More information about the Algol68
mailing list