Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: What's wron...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 10 Topic 5671 of 5931
Post > Topic >>

Re: What's wrong with my code?

by christoph.grein@[EMAIL PROTECTED] Apr 28, 2008 at 10:30 PM

Integer as an index is too big. Why not:

type Index is range 0..10;
subtype Index is Integer range 0..10;  -- alternatively
type My_Array is array (Index) of Element;

procedure Find_Min (A: My_Array; Offset, Pos: Index);
procedure Swap (A: in out My_Array; First, Second: Index);

etc
 




 10 Posts in Topic:
What's wrong with my code?
amal.alphonse@[EMAIL PROT  2008-04-28 07:42:44 
Re: What's wrong with my code?
george.priv@[EMAIL PROTEC  2008-04-28 08:23:10 
Re: What's wrong with my code?
stefan-lucks@[EMAIL PROTE  2008-04-28 17:18:31 
Re: What's wrong with my code?
stefan-lucks@[EMAIL PROTE  2008-04-28 17:22:25 
Re: What's wrong with my code?
stefan-lucks@[EMAIL PROTE  2008-04-28 17:24:52 
Re: What's wrong with my code?
Ivan Levashew <octagra  2008-04-28 23:52:00 
Re: What's wrong with my code?
christoph.grein@[EMAIL PR  2008-04-28 22:30:29 
Re: What's wrong with my code?
Ludovic Brenta <ludovi  2008-04-29 02:18:01 
Re: What's wrong with my code?
Ludovic Brenta <ludovi  2008-04-29 02:31:23 
Re: What's wrong with my code?
amal.alphonse@[EMAIL PROT  2008-04-29 03:33:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:31:29 CDT 2008.