@@ -103,17 +103,22 @@ =head2 SETTING THE ALTERNATE FORM AS THE DEFAULT
103103
104104=cut
105105
106+ # #########################################################################
107+
106108loadMacros(" MathObjects.pl" );
107109
108110sub _contextComplexJ_init {
109111 my $context = $main::context {Complex } = Parser::Context-> getCopy(" Complex" );
110112 context::ComplexJ-> Enable($context );
111113}
112114
115+ # ##############################################################
116+
113117package context::ComplexJ ;
114118
119+ #
115120# Enables complex j notation in the given context
116-
121+ #
117122sub Enable {
118123 my $self = shift ;
119124 my $context = shift || main::Context();
@@ -136,12 +141,13 @@ sub Enable {
136141 $context -> update;
137142}
138143
144+ #
139145# Sets all the complex-based default contexts to use ComplexJ
140146# notation. The two arguments determine the values for the
141147# enterComplex and displayComplex flags. If enterComplex is "j",
142148# then student answers must use the j notation (though
143149# professors can use either).
144-
150+ #
145151sub Default {
146152 my $self = shift ;
147153 my $enter = shift || " either" ;
@@ -162,7 +168,11 @@ sub Default {
162168 main::Context(main::Context()-> {name });
163169}
164170
165- # Handle Complex numbers so that they are displayed with the proper i or j value.
171+ # ##############################################################
172+ #
173+ # Handle Complex numbers so that they are displayed
174+ # with the proper i or j value.
175+ #
166176
167177package context::ComplexJ::Value::Complex ;
168178our @ISA = (' Value::Complex' );
@@ -183,7 +193,11 @@ sub TeX {
183193 return $z ;
184194}
185195
186- # Make Parser Value object maintain the indicator for which notation was used for a complex number.
196+ # ##############################################################
197+ #
198+ # Make Parser Value object maintain the indicator for
199+ # which notation was used for a complex number.
200+ #
187201
188202package context::ComplexJ::Parser::Value ;
189203our @ISA = (' Parser::Value' );
@@ -201,7 +215,11 @@ sub new {
201215
202216sub class {' Value' }
203217
204- # Make sure complex numbers maintain their flag for which format was used to create them.
218+ # ##############################################################
219+ #
220+ # Make sure complex numbers maintain their flag for
221+ # which format was used to create them.
222+ #
205223
206224package context::ComplexJ::Parser::Complex ;
207225our @ISA = (' Parser::Complex' );
@@ -215,9 +233,14 @@ sub eval {
215233
216234sub class {' Complex' }
217235
218- # Produce error messages when the wrong notation is used for complex numbers.
219-
220- # Swap i and j when required by the displayComplex flag in the output of constants.
236+ # ##############################################################
237+ #
238+ # Produce error messages when the wrong notation
239+ # is used for complex numbers.
240+ #
241+ # Swap i and j when required by the displayComplex flag
242+ # in the output of constants.
243+ #
221244
222245package context::ComplexJ::Parser::Constant ;
223246our @ISA = (' Parser::Constant' );
@@ -259,4 +282,6 @@ sub TeX {
259282
260283sub class {' Constant' }
261284
285+ # ##############################################################
286+
2622871;
0 commit comments