Cute! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of gerry-u2ug Sent: Friday, July 22, 2005 15:11 To: u2-users@listserver.u2ug.org Subject: RE: [U2] [UV] Select Question
LOOP while READNEXT ID GOSUB DO.STUFF REPEAT -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Allen E. Elwood Sent: Friday, July 22, 2005 05:34 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] [UV] Select Question Why even have an exit variable, when EXIT works great? LOOP READNEXT ID ELSE EXIT GOSUB DO.STUFF REPEAT Nice and clean and simple. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Anthony W. Youngman Sent: Friday, July 22, 2005 13:37 To: u2-users@listserver.u2ug.org Subject: Re: [U2] [UV] Select Question In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time, >[EMAIL PROTECTED] writes: > > >> SELECT FILE TO LIST >> LOOP >> READNEXT ID FROM LIST ELSE ID = @AM >> UNTIL ID = @AM DO >> REPEAT >> >> SELECT FILE >> LOOP >> READNEXT ID ELSE ID = @AM >> UNTIL ID = @AM DO >> REPEAT > >I agree that I don't see any extra overhead. >But why do you use an odd convention like ID = @AM ? >In this small loop it's probably apparent what you're doing but if the >distance between the LOOP and the UNTIL were large enough I dare say you'd be adding >confusion to the mix for any future programmer. > >What I do is >DONE = @FALSE >LOOP > READNEXT ID ELSE DONE = @TRUE >UNTIL DONE DO REPEAT > >I think DONE is a more clear-cut variable usage rather than setting ID to @AM >personally. Just my opinion. Until someone puts a GOSUB in and corrupts your DONE variable. You're far less likely to corrupt ID because you're more likely to be using it. Cheers, Wol -- Anthony W. Youngman <[EMAIL PROTECTED]> 'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998 Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/