## 4.87 - [stage] Built-InMnemonic aid: stage for STAGEd loop operations See also: Allows you to produce values through a range from start to end by specifying how many steps there are in the range, and what step to produce a floor(integer) or floating point result for. mode= is integer by default, and digits= (fractional part of float result) is 2 by default. This built-in is generally intended to be used with In the example below, there are four styles that together make up a very controllable looping construct. In [stage (mode=float,)(digits=N,)start end steps step][stage 100 50 10 5][stage 50 75 10 5][stage mode=float,0 1.5 3 2][stage mode=float,0 10 3 1][stage mode=float,digits=6,0 10 3 1][stage mode=float,0 1 10 5.5][style lowstage [repeat [parm 1] {mitt [stage [parm 2] [parm 3] [parm 4] [vinc pre=1,[parm 5]]]}]][style nstage [split [co],[b]][local [parm 5] [parm 0]]{lowstage}][style mitt Caught a [b] on [nd [dec [v mycount]]] iteration[nl]]nstage: startCount=1 stepsToTake=5 start=5 end=10 steps=5 countVariable {nstage 1,5,5,10,5,mycount}75 62 1.00 3.33 3.333333 0.55 nstage: startCount=1 stepsToTake=5 start=5 end=10 steps=5 countVariable Caught a 6 on 1st iteration Caught a 7 on 2nd iteration Caught a 8 on 3rd iteration Caught a 9 on 4th iteration Caught a 10 on 5th iteration
75
62
1.00
3.33
3.333333
0.55
nstage: startCount=1 stepsToTake=5 start=5 end=10 steps=5 countVariable
Caught a 6 on 1st iteration
Caught a 7 on 2nd iteration
Caught a 8 on 3rd iteration
Caught a 9 on 4th iteration
Caught a 10 on 5th iteration
Other built-ins used here:
Keyboard Navigation
, Previous Page . Next Page t TOC i Index This manual was generated with wtfm |