comp.lang.ada
 help / color / mirror / Atom feed
From: nobody@REPLAY.COM (Anonymous)
Subject: Re: GOTO considered necessary
Date: 1997/06/09
Date: 1997-06-09T00:00:00+00:00	[thread overview]
Message-ID: <199706091413.QAA02025@basement.replay.com> (raw)
In-Reply-To: 5n977i$2cmc$1@prime.imagin.net


One comment about the example with and without goto for a binary tree:
Both versions make the implicit assumption that Bv'Last < Natural'Last
(so that Bit > Bv'Last can be used to terminate if no new nodes are
needed). It would be better to make this assumption explicit by using a
different index subtype for Bit_Vector:

   subtype Bit_Vector_Index is Natural range 0 .. Natural'Last - 1;
   type Bit_Vector is array (Bit_Vector_Index range <>) of Boolean;
   Bit : Natural;

Murphy guarantees that someone will invoke this with Bv'Last =
Natural'Last sometime, causing a failure, if this change isn't made.

Jeff Carter  PGP:1024/440FBE21
My real e-mail address: ( carter @ innocon . com )
"Now go away, or I shall taunt you a second time."
Monty Python & the Holy Grail

Posted with Spam Hater - see
http://www.compulink.co.uk/~net-services/spam/




      parent reply	other threads:[~1997-06-09  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-06  0:00 GOTO considered necessary Samuel Mize
1997-06-06  0:00 ` Michel Gauthier
1997-06-07  0:00 ` Robert Dewar
1997-06-17  0:00   ` Woodrow Yeung
1997-06-20  0:00     ` Robert Dewar
1997-07-09  0:00       ` Woodrow Yeung
1997-06-23  0:00     ` Adam Beneschan
1997-06-07  0:00 ` Michael F Brenner
1997-06-08  0:00   ` Robert Dewar
1997-06-17  0:00     ` GOTO considered necessary (FSAs) Nick Roberts
1997-06-09  0:00 ` GOTO considered necessary Wolfgang Gellerich
1997-06-09  0:00 ` Anonymous [this message]
replies disabled

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