#120 closed defect (fixed)
A redifinition in an internal variable is shown as redefinition in a global variable
Reported by: | request | Owned by: | danirus |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Kernel | Version: | head |
Severity: | minor | Keywords: | |
Cc: |
Description
A redifinition in an internal variable is shown as redefinition in a global variable
A function definition that could be done in very internal file
Real MyFun(Real axisX, Real axisY)
{
axisY = 8; Erroneus redefinition
axisX + axisY
};
/* a lot of code ... */
Real GlobalVariableAlfa = 1;
Real GlobalVariableBeta = 2;
Real Result = MyFun(GlobalVariableAlfa, GlobalVariableBeta);
The error is:
ERROR: Variable 'GlobalVariableBeta' is already defined in :
.../err/error200408-sinenviar1.tol
And must be:
ERROR: Variable 'axisY' is already defined in :
and the path of the file
If MyFun() is declared in other file, the error shows the main
file path where GlobalVariableBeta is declared
With this error message the programmer look for a GlobalVariableBeta
redefinition not for a problem inside a function.
Change History (3)
comment:1 Changed 21 years ago by
Status: | new → assigned |
---|
comment:2 Changed 21 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 18 years ago by
bug_file_loc: | → http://www.tol-project.org |
---|
This bug has been resolved.
Two new attributes has been added to BUserFunction Class to control which
functions has been called and which is the File where has been declared and
defined. This improvements are a previous release to resolve the problem
reported by Jaime López Aybar with Bug 96.
Now if you have three next files:
fileA.tol:
fileB.tol:
fileC.tol:
Trying to compile the first, fileA.tol, you can see a message that informs about
a conflict between two variables, also the names of these two variables, and the
place where the problem appears, exactly within Myfunction into file fileB.tol.