RE: [sv-bc] Problem with $ferror in 1364 standard

From: Steven Sharp <sharp_at_.....>
Date: Mon Mar 20 2006 - 11:57:19 PST
>By "null fd", do you and Steven mean 0 or something else?

Yes.  It isn't really a null fd.  It is the error value returned by
$fopen on failure.  As Greg points out, it is closer to being an
MCD with no channels open, than any kind of file descriptor.

Regardless of what it would mean if you tried to use it with $fdisplay,
it is the value returned by $fopen on a failure.  If you want to call
$ferror to find out why, you didn't get a valid fd to pass in.  The
natural thing to pass is the invalid value that $fopen gave you instead
of a real fd.  So it seems reasonable for $ferror to assume that a 0
passed in for the fd came from $fopen, and that you are asking for the
reason why the $fopen failed.

It is rather a kludge, but it does provide the capability.

Steven Sharp
sharp@cadence.com
Received on Mon Mar 20 11:57:29 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 20 2006 - 11:57:36 PST