version 1.5, 2001/06/12 21:05:31
|
version 1.7, 2001/06/14 21:26:06
|
Line 523
|
Line 523
|
</tr> |
</tr> |
|
|
<tr> |
<tr> |
|
<td valign="top">map(seed;a,b,c,d;w,x,y,z)</td> |
|
<td valign="top">Option 1 - &map($seed,[\$w,\$x,\$y,\$z],[$a,$b,$c,$d]) or <br> |
|
Option 2 - &map($seed,\@mappedArray,[$a,$b,$c,$d]) <br> |
|
Option 3 - @mappedArray = &map($seed,[$a,$b,$c,$d]) <br> |
|
Option 4 - ($w,$x,$y,$z) = &map($seed,\@a) <br> |
|
where $a='A'<br> |
|
$b='B'<br> |
|
$c='B'<br> |
|
$d='B'<br> |
|
$w, $x, $y, and $z are variables</td> |
|
<td valign="top">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] => \@a.</td> |
|
<td valign="top">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 (\) before the arguments in the |
|
second and third groups.</td> |
|
</tr> |
|
|
|
|
|
<tr> |
|
<td valign="top">rmap(seed;a,b,c,d;w,x,y,z)</td> |
|
<td valign="top">Option 1 - &rmap($seed,[\$w,\$x,\$y,\$z],[$a,$b,$c,$d]) or <br> |
|
Option 2 - &rmap($seed,\@rmappedArray,[$a,$b,$c,$d]) <br> |
|
Option 3 - @rmapped_array = &rmap($seed,[$a,$b,$c,$d]) <br> |
|
Option 4 - ($w,$x,$y,$z) = &rmap($seed,\@a) <br> |
|
where $a='A'<br> |
|
$b='B'<br> |
|
$c='B'<br> |
|
$d='B'<br> |
|
$w, $x, $y, and $z are variables</td> |
|
<td valign="top">The rmap functions does the reverse action of map if the same seed |
|
is used in calling map and rmap. </td> |
|
<td valign="top">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 (\) before the arguments in the |
|
second and third groups.</td> |
|
</tr> |
|
|
|
<tr> |
<td valign="top">tex(a,b), tex("a","b")</td> |
<td valign="top">tex(a,b), tex("a","b")</td> |
<td valign="top">&tex($a,$b), &tex("a","b")</td> |
<td valign="top">&tex($a,$b), &tex("a","b")</td> |
<td valign="top">Returns a if the output mode is in tex otherwise |
<td valign="top">Returns a if the output mode is in tex otherwise |