DVItoPS on DECstation
Henry Spencer
henry at zoo.toronto.edu
Tue Oct 16 04:03:37 AEST 1990
In article <1990Oct13.204721.8027 at maths.tcd.ie> tim at maths.tcd.ie (Timothy Murphy) writes:
>I think it's quite a common practice to give the "rb" and "wb"
>arguments for Unix/DOS compatibility.
>Is this relying on the compiler's generosity?
>What does standard C say about it?
It's relying on the compiler being standard, which yours obviously isn't yet.
ANSI C says that those are legitimate forms, although on some systems they
may be equivalent to "r" and "w".
>And should the DECstation compiler have complained at compile-time,
>if it didn't understand the argument?
The compiler generally does not try to understand such strings and can't
complain. They are interpreted at run time; to the compiler, it's just a
character string. A compiler *could* try to check this, since the second
argument to fopen is almost invariably a string constant, but I'm not aware
of any that does.
It would have been nice if the combination of fopen() and the program in
question reported an error intelligently, so you could tell what was going
on, but intelligent error reporting is very rare.
--
"...the i860 is a wonderful source | Henry Spencer at U of Toronto Zoology
of thesis topics." --Preston Briggs | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.std.c
mailing list