Re: Why 'for', not 'from' ?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Because the for loop has the parameter first, then the range, it is
grammatically incorrect to have it from x=1 to 10.
for x=1 to 10 is a shortened form of 'for x in the range of 1 to 10'.
Most of this comes from how we talk about variables in mathematics.
if the parameter 'x' (or whatever you choose) was not before the range
(ie, the syntax was more like from 1 to 10 ... with parameter after)
then from would be grammatically correct as we would have the 'from'
refering to the start of the range, not the WHOLE range(the parameter).

Hope that makes sense for you.
Cheers,
Dan.


On Tue, 3 Jun 2003, Igor Kachan wrote:

>
>
> Hello Al:
>
> > --compare:
> >
> > for our container that is going to hold 1 to 10 different objects
> > --sounds ok
> >
> > from our container that is going to hold 1 to 10 different objects
> > --sounds like we are going to take something out of it.
>
> Why out?
>
> See please:
>
> A--------------------B
>
> A is start point of the loop's parameter.
> B is finish point of the loop's parameter.
>
> Parameter goes "from the A point to the B point".
> Is "out A to B" good in English for the line above ???
>
> [snip]
>
> > Then again, the 'for' loop takes up two less
> > bytes per loop
> > instance; what do you have to say about that?  smile
>
> Any key word inside EU interpreter is just 1 byte.
> In Russian, "FROM" = "OT" or "IZ", "OUT" = "IZ",
> but "FOR" = "DLYA"  blink
>
> Regards,
> Igor Kachan
> kinz at peterlink.ru
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu