--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex 2003/06/27 14:20:01 1.3 +++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex 2004/05/06 15:22:47 1.4 @@ -80,17 +80,19 @@ Option 1 - \&map(\$seed,[$\backslash$\$w Option 2 - \&map(\$seed,$\backslash$@mappedArray,[\$a,\$b,\$c,\$d]) \\ Option 3 - @mappedArray = \&map(\$seed,[\$a,\$b,\$c,\$d]) \\ Option 4 - (\$w,\$x,\$y,\$z) = \&map(\$seed,$\backslash$@a) \\ + Option 5 - @Z = \&map(\$seed,$\backslash$@a) \\ where \$a='A'\\ \$b='B'\\ \$c='B'\\ \$d='B'\\ - \$w, \$x, \$y, and \$z are variables } & Assigns to the variables \$w, \$x, \$y and \$z the values of the \$a, \$b, \$c and \$c (A, B, C and D). The precise value for \$w .. depends on the seed. (Option 1 of calling map). In option 2, the values of \$a, \$b .. are mapped into the array, @mappedArray. The two options illustrate the different grouping. Options 3 and 4 give a consistent way (with other functions) of mapping the items. For each option, the group can be passed as an array, for example, [\$a,\$b,\$c,\$d] =$>$ $\backslash$@a. \\ + \$w, \$x, \$y, and \$z are variables } & Assigns to the variables \$w, \$x, \$y and \$z the values of the \$a, \$b, \$c and \$c (A, B, C and D). The precise value for \$w .. depends on the seed. (Option 1 of calling map). In option 2, the values of \$a, \$b .. are mapped into the array, @mappedArray. The two options illustrate the different grouping. Options 3 and 4 give a consistent way (with other functions) of mapping the items. For each option, the group can be passed as an array, for example, [\$a,\$b,\$c,\$d] =$>$ $\backslash$@a. And Option 5 is the same as option 4 the array of results are saved into a signle array rather than an array opf scalar variables.\\ \hline \parbox{6.49cm}{Option 1 - \&rmap(\$seed,[$\backslash$\$w,$\backslash$\$x,$\backslash$\$y,$\backslash$\$z],[\$a,\$b,\$c,\$d]) or \\ Option 2 - \&rmap(\$seed,$\backslash$@rmappedArray,[\$a,\$b,\$c,\$d]) \\ Option 3 - @rmapped\_array = \&rmap(\$seed,[\$a,\$b,\$c,\$d]) \\ Option 4 - (\$w,\$x,\$y,\$z) = \&rmap(\$seed,$\backslash$@a) \\ + Option 5 - @Z = \&map(\$seed,$\backslash$@a) \\ where \$a='A'\\ \$b='B'\\ \$c='B'\\