Board index » delphi » While...do vs repeat..until
Fredrik Larsson
Delphi Developer |
Thu, 12 Aug 1999 03:00:00 GMT
|
Fredrik Larsson
Delphi Developer |
Thu, 12 Aug 1999 03:00:00 GMT
While...do vs repeat..untilThese two procedures do the same thing but I want to know which one to use example 1. example 2. All answers are appreciated, please also reply by e-mail if possible. Thanks, Fredrik Larsson. :o) >>>>>>>>>>>>>>>>>>> mail2f...@hotmail.com <<<<<<<<<<<<<<<<<<< (o: |
Jacob Graner
Delphi Developer |
Thu, 12 Aug 1999 03:00:00 GMT
Re:While...do vs repeat..untilHi. The first one is better since You might have an empty table. It is not While we are at it, You dont need a begin ... end when in a repeat ... /Jacob Granert Fredrik Larsson <Mail2F...@Hotmail.com> skrev i inl?gg Quote> These two procedures do the same thing but I want to know which one to |
Pascal Dutilleu
Delphi Developer |
Thu, 12 Aug 1999 03:00:00 GMT
Re:While...do vs repeat..untilQuoteFredrik Larsson wrote: detect eof, and then do something with the table, so your example1 is the right way to go. Just remember : (I hope it's clear enough ) Just my $.02 Pascal -------------------------------------------------------------------- {*word*137} software engineer (also via internet) Pascal.Dutill...@ping.be Borland Connections Member |
Vidmantas Mateli
Delphi Developer |
Thu, 12 Aug 1999 03:00:00 GMT
Re:While...do vs repeat..untilQuoteFredrik Larsson wrote: Quote> example 1. TURE and the loop body will be not executed. Quote> = examle will cause error on empty database. So, first examle is better. -- = Vidmantas Matelis |
Chri
Delphi Developer |
Fri, 13 Aug 1999 03:00:00 GMT
Re:While...do vs repeat..untilI have only used maybe 1 or 2 repeat-until loops - ever. In example 2, what if Just some input... In article <01bc219b$a6c05000$0100007f@fredde>, Mail2F...@Hotmail.com says... Quote
|
Bryan Valenci
Delphi Developer |
Sat, 14 Aug 1999 03:00:00 GMT
Re:While...do vs repeat..untilQuoteFredrik Larsson wrote: next. Quote> = Quote> Thanks, Fredrik Larsson. ----------------------------------------- |
Svante Granqvis
Delphi Developer |
Sun, 15 Aug 1999 03:00:00 GMT
Re:While...do vs repeat..untilQuoteFredrik Larsson wrote: Use while-do for loops with any loop count. -- = Svante Granqvist Speech, Music and Hearing Fax +46-8-790 7854 S-100 44 Stockholm |