Hi Wai,
Use this instead:
Local v r
r=1
For (v=5;v>=1;v=v-1);;Will loop as long as v is greater than or equal to 1
r = r*v
EndForwin.debug(r) --- In [email protected], "Wai" <chunwaih...@...> wrote: > > I write the following script to calculate 5x4x3x2x1, but the result is > wrong.What wrong? > > Local v r > r=1 > For (v=5;v=1;v=v-1) > r = r*v > EndFor > > win.debug(r) >
