Home
About
Policies
FAQ
Forums
Registration
Password Recovery

For (MPI)

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
-
[[Category:MPI functions]][[Category:MPI Looping Functions]]
+
[[Category:functions (MPI)]][[Category:Looping Functions (MPI)]]
=for=
=for=
<mpi>{for:varname,start,end,increment,command}</mpi>
<mpi>{for:varname,start,end,increment,command}</mpi>

Latest revision as of 01:38, 31 March 2007

for

{for:varname,start,end,increment,command}

Acts as a counting loop, like BASIC's for loops. The varname is the name of the variable that it will create and use to store the count value. The start value will be the initial value of the variable, and the end value will be the value that the variable is working towards.

The increment is how much the variable will be incremented by in each loop. The command will be evaluated for each value of the variable between the beginning and ending values.

For example:

{null:{for:i,10,1,-1,{tell:{&i}}}}

will echo a countdown from ten to one, inclusive, to the user.

Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox