[system] / trunk / pg / macros / Parser.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/Parser.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2666 Revision 3172
28 28
29# 29#
30# Parse a formula and evaluate it 30# Parse a formula and evaluate it
31# 31#
32sub Compute { 32sub Compute {
33 my $string = shift;
33 my $formula = Formula(shift); 34 my $formula = Formula($string)->eval(@_);
35 $formula->{correct_ans} = $string;
34 return $formula->eval(@_); 36 return $formula;
35} 37}
36 38
37# 39#
38# Deal with contexts 40# Deal with contexts
39# 41#

Legend:
Removed from v.2666  
changed lines
  Added in v.3172

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9