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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Compiler checking of String lengths during assignment (Newbie Question) Date: Sat, 10 Jan 2015 11:03:34 +0100 Organization: Home - http://www.obry.net Message-ID: <1420884214.25169.57.camel@obry.net> References: <77d434cc-00bc-4a2f-b50e-40736abdd2b2@googlegroups.com> Reply-To: pascal@obry.net NNTP-Posting-Host: mxtJ5056dp0udyOVtbMH6w.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Complaints-To: abuse@aioe.org X-Mailer: Evolution 3.12.9-1+b1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.giganews.com comp.lang.ada:191829 Date: 2015-01-10T11:03:34+01:00 List-Id: Le vendredi 09 janvier 2015 =C3=A0 14:50 -0800, isaac1.0@gmail.com a =C3=A9= crit :=20 > Aren't Ada compilers supposed to prevent stupid errors like this? Or is t= here some user stupidity here that I'm not seeing...? No, at compile time is only detect error that are statically computable. Here i+2 and i+4 are not, i is not a constant. So a runtime check is issued. Regards, --=20 Pascal Obry / Magny Les Hameaux (78) The best way to travel is by means of imagination http://v2p.fr.eu.org http://www.obry.net gpg --keyserver keys.gnupg.net --recv-key F949BD3B