[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 5372 Revision 5373
2 2
3sub _contextTF_init {}; # don't load it again 3sub _contextTF_init {}; # don't load it again
4 4
5=head3 Context("TF") 5=head3 Context("TF")
6 6
7########################################################## 7 ##########################################################
8# 8 #
9# Implements contexts for string-valued answers especially 9 # Implements contexts for string-valued answers especially
10# for matching problems (where you match against T and F). 10 # for matching problems (where you match against T and F).
11# 11 #
12# Context("TF"); 12 # Context("TF");
13# 13 #
14# You can add new strings to the context as needed (or remove old ones) 14 # You can add new strings to the context as needed (or remove old ones)
15# via the Context()->strings->add() and Context()-strings->remove() 15 # via the Context()->strings->add() and Context()-strings->remove()
16# methods. 16 # methods.
17# 17 #
18# Use: 18 # Use:
19# 19 #
20# ANS(string_cmp("T","F")); 20 # ANS(string_cmp("T","F"));
21# 21 #
22# when there are two answers, the first being "T" and the second being "F". 22 # when there are two answers, the first being "T" and the second being "F".
23# 23 #
24 24
25=cut 25=cut
26 26
27$context{TF} = Parser::Context->getCopy("String"); 27$context{TF} = Parser::Context->getCopy("String");
28$context{TF}->strings->are( 28$context{TF}->strings->are(
32 "False" => {alias => "F"}, 32 "False" => {alias => "F"},
33); 33);
34 34
35Context("TF"); 35Context("TF");
36 36
37 371;

Legend:
Removed from v.5372  
changed lines
  Added in v.5373

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9