Skip to content

Commit

Permalink
new context flag to require constant entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Jan 25, 2024
1 parent 832cb29 commit 053cfdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Parser/List/Vector.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ sub _check {
$type = (($type =~ m/^[aeiou]/i) ? "an " : "a ") . $type;
$self->{equation}->Error([ "Coordinates of Vectors must be Numbers, not %s", $type ]);
}
if ($self->context->flag("requireConstantEntries") && !($x->{isConstant})) {
$self->{equation}->Error("Coordinates of Vectors must be constant");
}
}
}

Expand Down

0 comments on commit 053cfdf

Please sign in to comment.