[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex CAPA_LON-CAPA_function_diffs.tex Problem_LON-CAPA_Functions.tex
bowersj2
lon-capa-cvs@mail.lon-capa.org
Tue, 10 Jun 2003 15:27:06 -0000
bowersj2 Tue Jun 10 11:27:06 2003 EDT
Modified files:
/loncom/html/adm/help/tex CAPA_LON-CAPA_function_diffs.tex
Problem_LON-CAPA_Functions.tex
Log:
Oops.
Index: loncom/html/adm/help/tex/CAPA_LON-CAPA_function_diffs.tex
diff -u loncom/html/adm/help/tex/CAPA_LON-CAPA_function_diffs.tex:1.1 loncom/html/adm/help/tex/CAPA_LON-CAPA_function_diffs.tex:1.2
--- loncom/html/adm/help/tex/CAPA_LON-CAPA_function_diffs.tex:1.1 Tue Jun 10 11:24:24 2003
+++ loncom/html/adm/help/tex/CAPA_LON-CAPA_function_diffs.tex Tue Jun 10 11:27:06 2003
@@ -74,25 +74,25 @@
\hline
/MAP(seed;w,x,y,z;a,b,c,d) & \parbox{6.49cm}{
-Option 1 - \&map(\$seed,[$\backslash$\$w,$\backslash$\$x,$\backslash$\$y,$\backslash$\$z],[\$a,\$b,\$c,\$d]) or !!
- 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) !!
- where \$a='A'!!
- \$b='B'!!
- \$c='B'!!
- \$d='B'!!
+Option 1 - \&map(\$seed,[$\backslash$\$w,$\backslash$\$x,$\backslash$\$y,$\backslash$\$z],[\$a,\$b,\$c,\$d]) or \\
+ 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) \\
+ where \$a='A'\\
+ \$b='B'\\
+ \$c='B'\\
+ \$d='B'\\
\$w, \$x, \$y, and \$z are variables } & In CAPA, the arguments are divided into three groups separated by a semicolon ;. In LON-CAPA, the separation is done by using [] brackets or using an array @a. Note the backslash ($\backslash$) before the arguments in the second and third groups. \\
\hline
-rmap(seed;a,b,c,d;w,x,y,z) & \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) !!
- where \$a='A'!!
- \$b='B'!!
- \$c='B'!!
- \$d='B'!!
+rmap(seed;a,b,c,d;w,x,y,z) & \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) \\
+ where \$a='A'\\
+ \$b='B'\\
+ \$c='B'\\
+ \$d='B'\\
\$w, \$x, \$y, and \$z are variables } & In CAPA, the arguments are divided into three groups separated by a semicolon ;. In LON-CAPA, the separation is done by using [] brackets (with create an unamed vector reference) or using an array @a. Note the backslash ($\backslash$) before the arguments in the second and third groups (Which cause Perl to send to variable locations rather than the variable values, similar to a C pointer). \\
\hline
Index: loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex
diff -u loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.1 loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.2
--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.1 Tue Jun 10 11:24:24 2003
+++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex Tue Jun 10 11:27:06 2003
@@ -76,25 +76,25 @@
\hline
\parbox{6.49cm}{
-Option 1 - \&map(\$seed,[$\backslash$\$w,$\backslash$\$x,$\backslash$\$y,$\backslash$\$z],[\$a,\$b,\$c,\$d]) or !!
- 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) !!
- where \$a='A'!!
- \$b='B'!!
- \$c='B'!!
- \$d='B'!!
+Option 1 - \&map(\$seed,[$\backslash$\$w,$\backslash$\$x,$\backslash$\$y,$\backslash$\$z],[\$a,\$b,\$c,\$d]) or \\
+ 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) \\
+ 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. \\
\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) !!
- where \$a='A'!!
- \$b='B'!!
- \$c='B'!!
- \$d='B'!!
+\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) \\
+ where \$a='A'\\
+ \$b='B'\\
+ \$c='B'\\
+ \$d='B'\\
\$w, \$x, \$y, and \$z are variables } & The rmap functions does the reverse action of map if the same seed is used in calling map and rmap. \\
\hline