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

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

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

Revision 5550 Revision 5551
1=head1 NAME
2
3contextString.pl - Allow string-valued answers.
4
5=head1 DESCRIPTION
6
7Implements contexts for string-valued answers.
8
9You can add new strings to the context as needed
10via the Context()->strings->add() method. E.g.,
11
12 Context("String")->strings->add(Foo=>{}, Bar=>{alias=>"Foo"});
13
14Use string_cmp() to produce the answer checker(s) for your
15correct values. Eg.
16
17 ANS(string_cmp("Foo"));
18
19=cut
20
1loadMacros("MathObjects.pl"); 21loadMacros("MathObjects.pl");
2 22
3sub _contextString_init {context::String::Init()}; # don't load it again 23sub _contextString_init {context::String::Init()}; # don't load it again
4
5=head3 Context("String")
6
7 ##########################################################
8 #
9 # Implements contexts for string-valued answers.
10 #
11 # You can add new strings to the context as needed
12 # via the Context()->strings->add() method. E.g.,
13 #
14 # Context("String")->strings->add(Foo=>{}, Bar=>{alias=>"Foo"});
15 #
16 # Use string_cmp() to produce the answer checker(s) for your
17 # correct values. Eg.
18 #
19 # ANS(string_cmp("Foo"));
20 #
21
22=cut
23 24
24################################################## 25##################################################
25 26
26package context::String::Variable; 27package context::String::Variable;
27 28

Legend:
Removed from v.5550  
changed lines
  Added in v.5551

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9