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,66bc6b039f1e005d X-Google-Attributes: gid103376,public From: Stefan Skoglund Subject: Re: Three simple questions Date: 2000/10/13 Message-ID: <39E7502B.182C607B@ebox.tninet.se>#1/1 X-Deja-AN: 681093291 Content-Transfer-Encoding: 7bit References: <2BED68CA963D6D55.A78776F656DA0452.75A61ED22116F1B6@lp.airnews.net> <39e2588f.21565740@news.demon.co.uk> X-Accept-Language: sv,en,en-US Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@algo.net X-Trace: zingo.tninet.se 971460416 6368 195.100.241.179 (13 Oct 2000 18:06:56 GMT) Organization: Telenordia Mime-Version: 1.0 NNTP-Posting-Date: 13 Oct 2000 18:06:56 GMT Newsgroups: comp.lang.ada Date: 2000-10-13T18:06:56+00:00 List-Id: John McCabe wrote: > At least one reason is for safety against misspelling. In > case-sensitive languages e.g. in C, if I had > > int an_Int; > : > > for (An_Int = 1; An_Int < 10; An_Int++) > : > blah blah > > and compile this I will get an error because of undefined An_Int. The > risk here is that I could just go to the declarations list and add: > > int An_Int; > > rather than realising that I've just written an_Int incorrectly. The problem in this case is implicit creation of new variables and whats more those variables is always a int ie the compiler wont bitch about the assignment.