From: Jeffrey R. Carter on 14 Jun 2010 23:28 Peter C. Chapin wrote: > > In my actual program the index variables are named differently than in my > example anyway. However, I admit that I have used 'Fst' and 'Lst' at times in > my code since I couldn't think of anything else that wasn't reserved. I > probably lack imagination. Initial and Final? Commence and Conclude? Origin and Destination? Alpha and Omega? -- Jeff Carter "Apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, the fresh water system, and public health, what have the Romans ever done for us?" Monty Python's Life of Brian 80
From: Niklas Holsti on 16 Jun 2010 15:03 Jeffrey R. Carter wrote: > Niklas Holsti wrote: >>... >> exit when Index_Fst >= Buffer'Last; > ... > > So it looks to me as if the correct test is > > exit when Index_Lst [>]= Buffer'Last; I agree. As too often happens, I was reading (and copying) what I expected to see, and not what was actually written. Five strokes of the lash for me... -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .
From: Ludovic Brenta on 16 Jun 2010 15:22 "Jeffrey R. Carter" <spam.jrcarter.not(a)spam.acm.org> writes: > So it looks to me as if the correct test is > > exit when Index_Lst [>]= Buffer'Last; > > (Maybe Brenta meant this, and mistyped it; the variable names are very > similar. Using _First and _Last might make such an error more > obvious.) Yes, that's what I meant, and I agree with you. In addition, Stephe's suggestion to replace Index_Fst and Index_Lst with a single Index, passed in out to Do_Something, is even better. -- Ludovic Brenta.
First
|
Prev
|
Pages: 1 2 3 4 5 6 Prev: What is SPARK about? Next: Improving the first contact with Ada |