1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> match exp(sin(x)) with
exp(a) : {
write("Exponential of ", a, "\n");
return a;
}
sin(x) : {
var foo;
foo = 17;
write("Sine of x\n");
return foo;
}
default : {
write("Something else\n");
bashexecute("LANG=C date");
return true;
};
Exponential of sin(x)
sin(x)
>
> match sin(x) with
exp(a) : {
write("Exponential of ", a, "\n");
return a;
}
sin(x) : {
var foo;
foo = 17;
write("Sine of x\n");
return foo;
}
default : {
write("Something else\n");
bashexecute("LANG=C date");
return true;
};
Sine of x
17
>
> match acos(17 * pi * x) with
exp(a) : {
write("Exponential of ", a, "\n");
return a;
}
sin(x) : {
var foo;
foo = 17;
write("Sine of x\n");
return foo;
}
default : {
write("Something else\n");
bashexecute("LANG=C date");
return true;
};
Something else
Fri Aug 24 11:17:01 CEST 2018
true
\end{Verbatim}
\end{minipage}\end{center}
|