This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Array bound checking: "lower bound of dimension 1 exceeded (1 < 7189)"


On Mon, Sep 14, 2009 at 09:27:01PM +0200, Toon Moene wrote:
> A Spanish colleague of mine was completely baffled by this error message:
> 
> "Shouldn't the lower bound of an array always be exceeded ?"
> 
> I can not come up with something better, but using the same verb for 
> "index below lower bound" as for "index above upper bound" is probably 
> confusing for most casual Fortran programmers.
> 
> Anyone who can think up an alternative ?
> 

How about?

  real x(2:4)
  x = 1.
  print *, x(1)
             1
Error: Index '1' at 1, outside of expected range [2:4]

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]