Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!bloom-beacon!think!ames!ucbcad!ucbvax!CLARKU.BITNET!RMANGALD From: RMANGALD@CLARKU.BITNET Newsgroups: comp.os.vms Subject: Why blast poor VAX C? Message-ID: <8707181853.AA14121@ucbvax.Berkeley.EDU> Date: Thu, 16-Jul-87 13:42:00 EDT Article-I.D.: ucbvax.8707181853.AA14121 Posted: Thu Jul 16 13:42:00 1987 Date-Received: Sun, 19-Jul-87 01:15:38 EDT Sender: parhi@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 49 In response to a query by John Yates (yates@a.chem.upenn.edu), who is having problems with G-floating numbers in VAX C, listmember Erik Naggum (ik.naggum-erik@siri.uio.no) writes: >I regard myself as an expert in C and UNIX. I have read the ANSI >Standard Draft of 10/10/86, and Kernighan and Richie's "The C >Programming Language". With 3 years of experience in C programming, and >200K source lines on my conscience, I have some comments to your >article, blaming C for various flaws in floating point operations on a >VAX (model X?), using VAX C version 2.2 under VMS. > >I took the time to go through a lot of documentation tonight, and >visited those for (AT&T) UNIX Version 7, System III and System V, >for SVID, for BSD release 4.3 and Ultrix 2.0, for XENIX 3 and XENIX 5, >and finally those of SUN OS. (Insert list of trademark owners here.) > >Nowhere can I find a reference to G-floating or, in fact, any other >specific implementation of floating point numbers, as part of the C >language. Rather, I have found that each machine and each implementor >decides which formats to use, and that they are more an attribute of the >hardware than of the language definition. > >Why not put away your VAX VMS or your VAX C, instead? With due respect, Mr. Naggum, I believe you are blaming the computer for the errors of the programmer. Considering your proficiency in the language, you must have undoubtedly caught theand the : Mr. Yates was trying to read in and print out a variable using conversions. Surely you cannot fault the compiler or the operating system for this? You have to agree that such mismatched conversions will give wrong results regardless of the C implementation, so long as the internal representation of and are different. Mr. Yates got a bit carried away in bombasting C, perhaps because (I suspect) he is not a programmer, and as non-programmers are wont to do, let of his frustration on the language. But Mr. Naggum, you are a professional programmer, and surely understand the difficulties faced by non-programmers, especially those who are grappling with an unfamiliar language. Bombasting VMS and VAX C is not going to solve any problems, and programming language/operating system fanaticism isn't going to get us anywhere. Let's generate more light, not heat. Sincerely, Rahul Mangaldas.