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

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

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

Revision 3662 Revision 3670
46 # Save the original context, and make a copy to which we 46 # Save the original context, and make a copy to which we
47 # add a variable for 'dx' 47 # add a variable for 'dx'
48 # 48 #
49 my $current = $$Value::context; 49 my $current = $$Value::context;
50 my $context = main::Context($current->copy); 50 my $context = main::Context($current->copy);
51 unless ($context->variables->get($dx)) {
51 $context->{_variables}->{pattern} = $context->{_variables}->{namePattern} = 52 $context->{_variables}->{pattern} = $context->{_variables}->{namePattern} =
52 $dx . '|' . $context->{_variables}->{pattern}; 53 $dx . '|' . $context->{_variables}->{pattern};
53 $context->update; 54 $context->update;
54 $context->variables->add($dx=>'Real'); 55 $context->variables->add($dx=>'Real');
56 }
55 $q = bless $self->SUPER::new($formula), $class; 57 $q = bless $self->SUPER::new($formula), $class;
56 $q->{isValue} = 1; $q->{isFormula} = 1; $q->{dx} = $dx; 58 $q->{isValue} = 1; $q->{isFormula} = 1; $q->{dx} = $dx;
57 main::Context($current); # put back the original context; 59 main::Context($current); # put back the original context;
58 return $q; 60 return $q;
59} 61}

Legend:
Removed from v.3662  
changed lines
  Added in v.3670

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9