Re: Porting Code to Postgresql
От | Dennis Gearon |
---|---|
Тема | Re: Porting Code to Postgresql |
Дата | |
Msg-id | 3F8E0D7A.4090809@fireserve.net обсуждение исходный текст |
Ответ на | Porting Code to Postgresql (Errol Neal <sysadmins@enhtech.com>) |
Список | pgsql-general |
Richard Welty wrote: >[taking this offlist] > >On Wed, 15 Oct 2003 19:51:00 -0700 Dennis Gearon <gearond@fireserve.net> wrote: > > >>In a for loop, you *always* execute the body of the loop one time, as >>far as I know. So if you have no rows, you would then have a problem. >>That is why I put the WHILE at the top. >> >> > >in some languages, for loops have this problem. this is why i reviewed two >php references to double check my facts before i posted my followup, and >both claimed that in php, the test is at the top of the loop. > >i can code something up and test it you like. > >richard > > You're right! I looked up http://www.php.net/for and found it. Apparently C also does the test at the top of the loop http://www.acm.uiuc.edu/webmonkeys/book/c_guide/1.6.html Well, that will simplify a lot of my future code :-) -- "You are behaving like a man", is an insult from some women, a compliment from an good woman.
В списке pgsql-general по дате отправления: