[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Problem_LON-CAPA_Functions.tex

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 06 May 2004 15:22:47 -0000


albertel		Thu May  6 11:22:47 2004 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Problem_LON-CAPA_Functions.tex 
  Log:
  - adding another example to &map, bug 2981
  
  
Index: loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex
diff -u loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.3 loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.4
--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.3	Fri Jun 27 10:20:01 2003
+++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex	Thu May  6 11:22:47 2004
@@ -80,17 +80,19 @@
  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'\\