On 12/16/06, [EMAIL PROTECTED] via RT <[EMAIL PROTECTED]> wrote:
On Sat Nov 11 11:53:27 2006, [EMAIL PROTECTED] wrote:
> Not sure if this is a bug or not, but I noticed that the open opcode
> creates its argument if the desired file doesn't exist.
>
There are two variants of the open opcode: this one, and one where you
can specify a mode. The default open mode at the moment is "+<" - that
is, open for read and create it if it doesn't exist. You can specify
another operand to open specifying the open mode "<" instead, which will
just open the file and not create it.

So, I think this is not a bug - yes, we could argue all day about what
the default open mode should be, but there's a perfectly good way to be
explicit about you want that's only a few characters to type. :-)

pardon my ignorance, because i haven't checked the documentation, but
is the behavior in the last paragraph documented? arguably, it is a
bug in the C<open> documentation unless that opcode it is described as
defaulting to '+<'.
~jerry

Reply via email to