#107 closed enhancement (fixed)
No clear error: Type mismatch Real / Set
Reported by: | request | Owned by: | danirus |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Kernel | Version: | head |
Severity: | minor | Keywords: | |
Cc: |
Description
No clear error: Type mismatch Real / Set
The following functions try to return a set instead a Real
The first one writes a clear error: set is not an object of type Real
The second one no
Real ClearError(Real n)
{
Set set = For(1, n, Real(Real x) { x + 1 });
set
};
Real NoClearError(Real n)
{
Set forCic = For(1, n, Real(Real x) { x + 1 })
};
Text WriteLn(Repeat("-",30));
Real goodFun = ClearError(3);
Text WriteLn(Repeat("-",30));
Real badFun = NoClearError(3);
Change History (4)
comment:1 Changed 21 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 21 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
No clear error: Type mismatch Real / Set
Bug 107 (reopened)
The following functions try to return a set instead a Real
The first one writes a clear error: set is not an object of type Real
The second one no (SEE THE END OF MESSAGE)
The difference bewteen both functions is that the first one makes
the asignement and returns the variable and the second one only
makes the assignement (the return is implicit)
Real ClearError(Real n)
{
Set set = For(1, n, Real(Real x) { x + 1 });
set
};
Real NoClearError(Real n)
{
Set forCic = For(1, n, Real(Real x) { x + 1 })
};
Text WriteLn(Repeat("-",30));
Real goodFun = ClearError(3);
Text WriteLn(Repeat("-",30));
Real badFun = NoClearError(3);
/* TOL said:
ERROR: set is not an object of type Real.
ERROR: Fail in function ClearError
ERROR: goodFun could not be created.
ERROR: badFun could not be created.
*/
/* TOL must say:
ERROR: set is not an object of type Real.
ERROR: Fail in function ClearError
ERROR: goodFun could not be created.
ERROR: forCic is not an object of type Real.
ERROR: Fail in function NoClearError
ERROR: badFun could not be created.
*/
comment:3 Changed 21 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This is the output I get executing that code.
ERROR: set is not an object of type Real.
ERROR: Fail in function "ClearError"
ERROR: goodFun could not be created.
ERROR: could not convert from Set to Real for object 'forCic'
ERROR: Fail in function "NoClearError"
ERROR: badFun could not be created.
Maybe you must update from CVS or wait for the next version that we are going to
release as soon as possible (perhaps next week).
comment:4 Changed 18 years ago by
bug_file_loc: | → http://www.tol-project.org |
---|
Hello Antonio,
Bug 109 has been resolved. Could you verify this bug again?
Keep in touch.
Cheers
Daniel