Re: A89: Re: tigcc (important)


[Prev][Next][Index][Thread]

Re: A89: Re: tigcc (important)




> {
>          for(i,0,10)
>          {}
> }
>

you must be new to C or something.

for(initialization;test;modify)
    statement;

initialization is where the variable is set to 0 or whatever
test is what is performed to see if the loop should continue
modify is what is done to the variable around each loop
for a loop like i assume you want (from 0 to 10):

for(i=0;i<11;i++)
    {}

this makes the for statement so much more versatile than that found in other
languages
you could have something like this:

for(y=x=0;x<i;y++;x++;i+=y*x)

which im not sure is really that important that you can do, but you could if
you wanted to, which is all the difference! :)

--kaus





Follow-Ups: References: