Subject: | User-Defined Functions with no arguments |
The parser seems to fail handling functions with no arguments.
In the following example I create an additional function someFunc which
takes no arguments and it fails parsing it.
Am i doing something wrong or is it a bug in the module ?
---------------------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use Math::Expression;
sub moreFunctions {
my ($self, $fname, @arglist) = @_;
return 1.023 if ($fname eq 'someFunc');
return undef;
}
my $ArithEnv = new Math::Expression('ExtraFuncEval', \&moreFunctions);
my $tree = $ArithEnv->Parse('someFunc() - 21 ');
---------------------------------------------------------------------