| … | |
… | |
| 11 | # |
11 | # |
| 12 | sub _check { |
12 | sub _check { |
| 13 | my $self = shift; my $name = $self->{def}{string} || $self->{bop}; |
13 | my $self = shift; my $name = $self->{def}{string} || $self->{bop}; |
| 14 | $self->Error("Only one equality is allowed in an equation") |
14 | $self->Error("Only one equality is allowed in an equation") |
| 15 | if ($self->{lop}->type eq 'Equality' || $self->{rop}->type eq 'Equality'); |
15 | if ($self->{lop}->type eq 'Equality' || $self->{rop}->type eq 'Equality'); |
| 16 | $self->Error("Operands of '$name' must be Numbers") unless $self->checkNumbers(); |
16 | $self->Error("Operands of '%s' must be Numbers",$name) unless $self->checkNumbers(); |
| 17 | $self->{type} = Value::Type('Equality',1); # Make it not a number, to get errors with other operations. |
17 | $self->{type} = Value::Type('Equality',1); # Make it not a number, to get errors with other operations. |
| 18 | } |
18 | } |
| 19 | |
19 | |
| 20 | # |
20 | # |
| 21 | # Determine if the two sides are equal (use fuzzy reals) |
21 | # Determine if the two sides are equal (use fuzzy reals) |