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

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

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

Revision 5550 Revision 5551
1loadMacros("MathObjects.pl","contextString.pl"); 1=head1 NAME
2 2
3=head3 Context("TF") 3contextTF.pl - Imlements contexts for true/false problems.
4 4
5 ########################################################## 5=head1 DESCRIPTION
6 # 6
7 # Implements contexts for string-valued answers especially 7Implements contexts for string-valued answers especially
8 # for matching problems (where you match against T and F). 8for matching problems (where you match against T and F).
9 # 9
10 # Context("TF"); 10 Context("TF");
11 # 11
12 # You can add new strings to the context as needed (or remove old ones) 12You can add new strings to the context as needed (or remove old ones)
13 # via the Context()->strings->add() and Context()-strings->remove() 13via the Context()->strings->add() and Context()-strings->remove()
14 # methods. 14methods.
15 # 15
16 # Use: 16Use:
17 # 17
18 # ANS(string_cmp("T","F")); 18 ANS(string_cmp("T","F"));
19 # 19
20 # when there are two answers, the first being "T" and the second being "F". 20when there are two answers, the first being "T" and the second being "F".
21 #
22 21
23=cut 22=cut
23
24loadMacros("MathObjects.pl","contextString.pl");
24 25
25sub _contextTF_init { 26sub _contextTF_init {
26 27
27 my $context = $main::context{TF} = Parser::Context->getCopy("String"); 28 my $context = $main::context{TF} = Parser::Context->getCopy("String");
28 $context->{name} = "TF"; 29 $context->{name} = "TF";

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9