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

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

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

Revision 5393 Revision 5395
13 # they want, and it doesn't have to be the one the professor used. 13 # they want, and it doesn't have to be the one the professor used.
14 # 14 #
15 # To use FormulaWithConstat objects, load this macro file at the 15 # To use FormulaWithConstat objects, load this macro file at the
16 # top of your problem: 16 # top of your problem:
17 # 17 #
18 # loadMacros("parserFormulaUpToConstant"); 18 # loadMacros("parserFormulaUpToConstant.pl");
19 # 19 #
20 # then create a formula with constant as follows: 20 # then create a formula with constant as follows:
21 # 21 #
22 # $f = FormulaUpToConstant("sin(x)+C"); 22 # $f = FormulaUpToConstant("sin(x)+C");
23 # 23 #
62 # 62 #
63 # $f = FormulaUpToConstant("sin(x)+C"); 63 # $f = FormulaUpToConstant("sin(x)+C");
64 # $g = Formula("cos(x)"); 64 # $g = Formula("cos(x)");
65 # $h = $f->removeConstant + $g; # $h will be "sin(x)+cos(x)" 65 # $h = $f->removeConstant + $g; # $h will be "sin(x)+cos(x)"
66 # $h = FormulaUpToConstant($h); # $h will be "sin(x)+cos(x)+C" 66 # $h = FormulaUpToConstant($h); # $h will be "sin(x)+cos(x)+C"
67 #
68 # The answer evaluator by default will give "helpful" messages
69 # to the student when the "+ C" is left out. You can turn off
70 # these messages using the showHints option to the cmp() method:
71 #
72 # ANS($f->cmp(showHints => 0));
67 # 73 #
68 ###################################################################### 74 ######################################################################
69 75
70=cut 76=cut
71 77

Legend:
Removed from v.5393  
changed lines
  Added in v.5395

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9