From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a1a88c4d509f6381 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: scope and/or parameters (beginner) Date: 1999/04/14 Message-ID: <7f2ar3$b6l$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 466304054 References: <37064309.889106243@news.dsuper.net> <37084459.8616007@rocketmail.com> <370b0c99.1137352783@news.dsuper.net> <7f2435$54d$1@nnrp1.dejanews.com> <37149AE9.883147B6@prolifics.com> X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Apr 14 15:05:13 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-04-14T00:00:00+00:00 List-Id: In article <37149AE9.883147B6@prolifics.com>, Hyman Rosen wrote: > Robert Dewar wrote: > > A C programmer making the same choice would have two > > approaches. > > ... > > Which do you think would be chosen (I would guess neither, > > Correct. A C programmer would, of course, simply declare the > parameter as being 'const', then insert the test exactly as > you did in Ada. > > Hmph. I'm surprised that you, of all people, are so parochial. > You usually aren't. I don't think "const" exists in all versions of C. My old C reference book (circa 1984) doesn't list it as a reserved word, or anywhere at all for that matter. I suspect that means it did not exist in K&R C. Was it introduced in ANSI C? In C++? I don't look at too much C code myself, but the first time I ever saw "const" in C source was about 3 months ago, and it was for a C++ capable compiler. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own