Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site amdcad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!pesnta!amd!amdcad!jimb From: jimb@amdcad.UUCP (Jim Budler) Newsgroups: net.micro.mac Subject: Re: Harmonic Series Benchmark Message-ID: <1493@amdcad.UUCP> Date: Mon, 3-Jun-85 15:09:02 EDT Article-I.D.: amdcad.1493 Posted: Mon Jun 3 15:09:02 1985 Date-Received: Wed, 5-Jun-85 00:26:37 EDT References: <1363@amd.UUCP> <6437@boring.UUCP> Reply-To: jimb@amdcad.UUCP (Jim Budler) Organization: AMD, Sunnyvale, California Lines: 94 Keywords: Consulair, SUMacC, C, portability In article <6437@boring.UUCP> guido@boring.UUCP (Guido van Rossum) writes: >was rather upset about what was left of my favourite language, "C". >(Readers not prepared for flames, please skip to "Comments", below.) >> #Options D=300 >What's this? can't we just pass the options to the C compiler any more? > What do you think that is. An ice cream bar? >---------- >> extended seconds; >Huh? Is this a recent extension to ANSI C that I have missed? I didn't post an ANSI C program, I posted a Mac C program. >---------- >with *fopen*, not with *open*. On some systems (including that obscure >system whose name starts with U, ends with an x and has nothing but footnotes >in between) this makes a lot of differences, ya know. I posted the program to net.sources.MAC, not net.U**x >---------- >> /* Lots of printf's */ They said what I wanted them to say. >I am sure that when I last looked, declarations should strictly *precede* >statements. It's not true in Mac C. > >---------- >> printf("\nThis is a Macintosh with Consulair Mac C 2.0,\n"); > >WRONG. This Macintosh (i.e., mine) is running SUMacC. And here I thought that your Vax was running SUMacC. >Comments > >I won't comment on programming style, but I think that a program that is Oh I thought you did. >meant as a benchmark could at least have the decency to use only portable >features of a language. Where this is not possible (e.g., when the timing >difference for using 'extended' numbers is exercised), #ifdefs should >enclose the non-portable sections, and appropriate warnings made in comments. I posted a Mac C source to net.sources.MAC, next time you see a posting that says Mac C or Megamax C or something maybe you should consider it as Forth or something. >... In this case, considering the burden already >placed on the net by inappropriate or duplicate postings, it would have Your posting was larger than my program and probably took longer to write. >been better not to post it at all. Consider this article as a short >lesson in portability. I hate to say it but almost none of the code posted to net.sources.mac is portable. I have to change include file names, toolbox calls, and many other things. > >Admittedly, it is quite possible that the manufacturers of Consulair C >have done their best to hide the fact that there are other versions of >C than theirs, and not provided any clues to the differences. The fact >that they added #Options, one-line comments and the 'extended' data type >makes one expect the worst. One suspects that they have never been exposed >to a real C compiler (I mean one running under U**x). How come they're >such a big success? Extended data type was created by IEEE not Consulair. One line comments were under discussion by ANSI. #Options is a preprocessor command which is needed because Mac C doesn't run under either 'sh' or 'csh' and thus has NO command line to parse. What makes you think U**x compilers are so great. A 4.2 program doesn't work on a v7 or a SysV....... > >BTW, SUMacC floating point (at least what you get when you use 'double' or >'float' variables) is not SANE, and it has some peculiarities, but the >timing was about 22 seconds, independent of whether float or double was >used. The answer seemed right, at least for 'double'. (Just to prove >that I *did* manage to correct all the bugs mentioned above.) The program ran as written on the compiler it was written for, and you call these *bugs*??? I'm really glad you liked my program and I am so sorry that you wont be able to compile any of my sources I decide to post, because I'm using a native Macintosh language which contains calls not found in ANSI C such as: GetResInfo() SetResInfo() OpenResourceFile() Or are you saying that I shouldn't post programs to net.sources.MAC unless they'll run on a U**x machine? What garbage. -- Jim Budler Advanced Micro Devices, Inc. (408) 749-5806 UUCPnet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amdcad!jimb Compuserve: 72415,1200 "... Don't sue me, I'm just the piano player!...."