… | |
… | |
26 | } |
26 | } |
27 | $equation->Error(["Variable '%s' is not defined in this context",$name],$ref) |
27 | $equation->Error(["Variable '%s' is not defined in this context",$name],$ref) |
28 | if $variables-> {$name}{parameter} && $equation->{context}{flags}{no_parameters}; |
28 | if $variables-> {$name}{parameter} && $equation->{context}{flags}{no_parameters}; |
29 | $equation->{variables}{$name} = 1; |
29 | $equation->{variables}{$name} = 1; |
30 | my $def = $variables->{$name}; |
30 | my $def = $variables->{$name}; |
31 | bless { |
31 | my $v = bless { |
32 | name => $name, def => $def, type => $def->{type}, |
32 | name => $name, def => $def, type => $def->{type}, |
33 | ref => $ref, equation => $equation |
33 | ref => $ref, equation => $equation |
34 | }, $class; |
34 | }, $class; |
|
|
35 | $v->weaken; |
|
|
36 | return $v; |
35 | } |
37 | } |
36 | |
38 | |
37 | # |
39 | # |
38 | # Replace the variable with its value, if one was given |
40 | # Replace the variable with its value, if one was given |
39 | # |
41 | # |