Re: Thou shalt have no other gods before the ANSI C standard
From: Peter Flass (Peter_Flass_at_Yahoo.com)
Date: 02/27/05
- Next message: Nora Baron: "Re: SF: Back to theory"
- Previous message: vedaal: "Re: Plausible deniability vs useability"
- In reply to: Douglas A. Gwyn: "Re: Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Ignatios Souvatzis: "Re: Thou shalt have no other gods before the ANSI C standard"
- Reply: Ignatios Souvatzis: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 27 Feb 2005 14:18:41 GMT
Douglas A. Gwyn wrote:
> Douglas A. Gwyn wrote:
>
>> ... The PL/I example he posted was for a *known*
>> string length, which is much simpler to optimize.
>
>
> Also, somebody else pointed out that unlike C, in PL/I
> (and FORTRAN, at least the earlier versions) the loop
> step size and limit are specified as being computed
> before the loop starts. C has a more dynamic (thus
> more powerful) for-loop construct.
Not quite true. PL/I has the WHILE and UNTIL options of DO (differing
in whether the test is executed before or after the loop body).
You can say, e.g.
DO i=1 BY 1 WHILE( i<=length(string) );
which is, I believe, just about exactly equivalent to:
for ( i=0; i++; i<strlen(string) ) {
in that the conditional is executed every time through the loop.
It's not as common a construction, just because of the repeated
evaluation, but it's there if you want it.
- Next message: Nora Baron: "Re: SF: Back to theory"
- Previous message: vedaal: "Re: Plausible deniability vs useability"
- In reply to: Douglas A. Gwyn: "Re: Thou shalt have no other gods before the ANSI C standard"
- Next in thread: Ignatios Souvatzis: "Re: Thou shalt have no other gods before the ANSI C standard"
- Reply: Ignatios Souvatzis: "Re: Thou shalt have no other gods before the ANSI C standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|