comp.lang.ada
 help / color / mirror / Atom feed
From: Kas_le_chat <kasino@attcanada.net>
Subject: Re: loop and constraint error(Thanks that fix ..it all)
Date: 1998/10/13
Date: 1998-10-13T00:00:00+00:00	[thread overview]
Message-ID: <3622BAED.2A39@attcanada.net> (raw)
In-Reply-To: m33e8t62oo.fsf@mheaney.ni.net

Matthew Heaney wrote:
> 
> Kas_le_chat <kasino@attcanada.net> writes:
> 
> > Thanks a lot. That fix the constraint_error and the loop problem.
> > I still have the data_error problem.When i provoque it, the program go
> > crazy and loop for ever. Any sugestion is welcome and thanks again.
> 
> Do a Skip_Line in the exception handler.  This will move past the
> current line (which has the bad data).

Thanks a lot it work. This is the code :
begin
   
      
   Entrer_Quantite : --nom de la boucle.
      loop
         begin
            Put("Entrez la quantitee de pomme, MINIMUM 0 et MAXIMUM 50
Kg:");
            es_reels.Get(v_pommes);
            exit Entrer_Quantite;

             exception
            when constraint_error | data_error => 

               Put_Line("Un nombre entre 0.0 et 50.0");
            when others =>  
           
                text_io.skip_line;

          end;
      end loop Entrer_Quantite;
   
Thanks to all who gived me some solutions.
Kas




  reply	other threads:[~1998-10-13  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-11  0:00 loop and constraint error Kas_le_chat
1998-10-12  0:00 ` Frank Ecke
1998-10-12  0:00   ` loop and constraint error(Thanks that fix .....) Kas_le_chat
1998-10-13  0:00     ` Matthew Heaney
1998-10-13  0:00       ` Kas_le_chat [this message]
1998-10-12  0:00 ` loop and constraint error- I really nead help for this problem thanks Kas_le_chat
1998-10-12  0:00   ` alan walkington
replies disabled

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