comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
Subject: Re: Compiler checking of String lengths during assignment (Newbie Question)
Date: Sat, 10 Jan 2015 11:03:34 +0100
Date: 2015-01-10T11:03:34+01:00	[thread overview]
Message-ID: <1420884214.25169.57.camel@obry.net> (raw)
In-Reply-To: 77d434cc-00bc-4a2f-b50e-40736abdd2b2@googlegroups.com

Le vendredi 09 janvier 2015 à 14:50 -0800, isaac1.0@gmail.com a écrit : 
> Aren't Ada compilers supposed to prevent stupid errors like this? Or is there 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,

-- 
  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




  parent reply	other threads:[~2015-01-10 10:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 22:50 Compiler checking of String lengths during assignment (Newbie Question) isaac1.0
2015-01-09 23:10 ` Simon Wright
2015-01-09 23:20   ` Stefan.Lucks
2015-01-10 12:43     ` Brian Drummond
2015-01-09 23:53 ` Shark8
2015-01-10  0:18 ` Jeffrey Carter
2015-01-10  1:48 ` Adam Beneschan
2015-01-10 10:03 ` Pascal Obry [this message]
2015-01-10 10:54 ` Simon Wright
2015-01-15 20:44 ` isaac1.0
2015-01-15 21:18   ` Simon Wright
2015-01-15 22:30     ` Jeffrey Carter
2015-01-15 22:32     ` Jeffrey Carter
2015-01-16  7:28       ` Simon Wright
2015-01-16 15:44         ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox