home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!think.com!ames!agate!usenet.ins.cwru.edu!ncoast!brown
- From: brown@NCoast.ORG (Stan Brown)
- Subject: Re: DEC VMS VERSION OF C - HOW TO ASSIGN FILE NAME?
- Organization: Oak Road Systems, Cleveland Ohio USA
- Date: Sun, 8 Nov 1992 19:35:47 GMT
- Message-ID: <BxEx3p.AHF@NCoast.ORG>
- References: <92310.16240634R33O7@CMUVM.CSV.CMICH.EDU> <1992Nov6.072147.16000@sbcs.sunysb.edu>
- Lines: 19
-
- In article <1992Nov6.072147.16000@sbcs.sunysb.edu> rhorn@csws11.ic.sunysb.edu (Robert Horn) writes:
- >
- >Look up fopen (and fclose while you're at it) in your favorite C
- >book (which should be K&R 2nd Edition).
-
- Ordinarily, this is good advice. However, when dealing with a
- particular compiler it's generally advisable to look at the manual for
- that compiler. In the particular case of VMS C, which is not ANSI C but
- a DEC-enhanced version of "classic" C, either version of K&R will
- mislead you on many points of libraries. For instance, if you want
- to write a normal text file, you must specify _four_ arguments to fopen:
- fileptr = fopen(filename, "w", "rat=cr", "rfm=var");
- You won't find that in K&R.
-
- --
- Stan Brown, Oak Road Systems brown@Ncoast.ORG
- Cleveland, Ohio, USA
- "Only the futility of the first flood prevents God from unleashing another."
- --Chamfort, as quoted in Claude Arnaud's {Chamfort: A Biography}
-