[system] / trunk / pg / lib / Parser / Function / numeric.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Parser/Function/numeric.pm

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

Revision 2914 Revision 3370
24# 24#
25# Check the arguments and return the (real or complex) result. 25# Check the arguments and return the (real or complex) result.
26# 26#
27sub _call { 27sub _call {
28 my $self = shift; my $name = shift; 28 my $self = shift; my $name = shift;
29 Value::Error("Function '$name' has too many inputs") if scalar(@_) > 1; 29 Value::Error("Function '%s' has too many inputs",$name) if scalar(@_) > 1;
30 Value::Error("Function '$name' has too few inputs") if scalar(@_) == 0; 30 Value::Error("Function '%s' has too few inputs",$name) if scalar(@_) == 0;
31 my $n = $_[0]; 31 my $n = $_[0];
32 return $self->$name($n) if Value::matchNumber($n); 32 return $self->$name($n) if Value::matchNumber($n);
33 (Value::Complex::promote($n))->$name; 33 (Value::Complex::promote($n))->$name;
34} 34}
35 35

Legend:
Removed from v.2914  
changed lines
  Added in v.3370

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9