Diff for /loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex between versions 1.3 and 1.4

version 1.3, 2003/06/27 14:20:01 version 1.4, 2004/05/06 15:22:47
Line 80  Option 1 - \&map(\$seed,[$\backslash$\$w Line 80  Option 1 - \&map(\$seed,[$\backslash$\$w
  Option 2 - \&map(\$seed,$\backslash$@mappedArray,[\$a,\$b,\$c,\$d]) \\   Option 2 - \&map(\$seed,$\backslash$@mappedArray,[\$a,\$b,\$c,\$d]) \\
  Option 3 - @mappedArray = \&map(\$seed,[\$a,\$b,\$c,\$d]) \\   Option 3 - @mappedArray = \&map(\$seed,[\$a,\$b,\$c,\$d]) \\
  Option 4 - (\$w,\$x,\$y,\$z) = \&map(\$seed,$\backslash$@a) \\   Option 4 - (\$w,\$x,\$y,\$z) = \&map(\$seed,$\backslash$@a) \\
    Option 5 - @Z = \&map(\$seed,$\backslash$@a) \\
  where \$a='A'\\   where \$a='A'\\
  \$b='B'\\   \$b='B'\\
  \$c='B'\\    \$c='B'\\ 
  \$d='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  \hline
     
 \parbox{6.49cm}{Option 1 - \&rmap(\$seed,[$\backslash$\$w,$\backslash$\$x,$\backslash$\$y,$\backslash$\$z],[\$a,\$b,\$c,\$d]) or \\   \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 2 - \&rmap(\$seed,$\backslash$@rmappedArray,[\$a,\$b,\$c,\$d]) \\
  Option 3 - @rmapped\_array = \&rmap(\$seed,[\$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 4 - (\$w,\$x,\$y,\$z) = \&rmap(\$seed,$\backslash$@a) \\
    Option 5 - @Z = \&map(\$seed,$\backslash$@a) \\
  where \$a='A'\\   where \$a='A'\\
  \$b='B'\\   \$b='B'\\
  \$c='B'\\    \$c='B'\\ 

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>