Cousteau - 2012-06-08

How do I use the for() function?  I've tried

for (1; x; x<10; x+1;   1; y*x; y)

in order to calculate a factorial (as an example), but this will just keep running forever.