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

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

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

Revision 3294 Revision 3371
176 my $self = shift; 176 my $self = shift;
177 my $super = ref($self); $super =~ s/LimitedPolynomial/Parser/; 177 my $super = ref($self); $super =~ s/LimitedPolynomial/Parser/;
178 &{$super."::_check"}($self); 178 &{$super."::_check"}($self);
179 my $op = $self->{op}; 179 my $op = $self->{op};
180 return if LimitedPolynomail::isConstant($op); 180 return if LimitedPolynomail::isConstant($op);
181 $self->Error("You can only use '$self->{def}{string}' with monomials") 181 $self->Error("You can only use '%s' with monomials",$self->{def}{string})
182 if $op->{isPoly}; 182 if $op->{isPoly};
183 $self->{isPoly} = 2; 183 $self->{isPoly} = 2;
184 $self->{powers} = {%{$op->{powers}}} if $op->{powers}; 184 $self->{powers} = {%{$op->{powers}}} if $op->{powers};
185} 185}
186 186
224 my $self = shift; 224 my $self = shift;
225 my $super = ref($self); $super =~ s/LimitedPolynomial/Parser/; 225 my $super = ref($self); $super =~ s/LimitedPolynomial/Parser/;
226 &{$super."::_check"}($self); 226 &{$super."::_check"}($self);
227 my $arg = $self->{params}->[0]; 227 my $arg = $self->{params}->[0];
228 return if LimitedPolynomial::isConstant($arg); 228 return if LimitedPolynomial::isConstant($arg);
229 $self->Error("Function '$self->{name}' can only be used with numbers"); 229 $self->Error("Function '%s' can only be used with numbers",$self->{name});
230} 230}
231 231
232 232
233package LimitedPolynomial::Function::numeric; 233package LimitedPolynomial::Function::numeric;
234our @ISA = qw(LimitedPolynomial::Function Parser::Function::numeric); 234our @ISA = qw(LimitedPolynomial::Function Parser::Function::numeric);

Legend:
Removed from v.3294  
changed lines
  Added in v.3371

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9