close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 15 years ago

Closed 15 years ago

#864 closed defect (fixed)

TOL breakdown in erroneous defining class

Reported by: César Pérez Álvarez Owned by: Víctor de Buen Remiro
Priority: normal Milestone: OOP Implementation
Component: OOP Version: 2.0.1
Severity: normal Keywords:
Cc:

Description (last modified by Víctor de Buen Remiro)

If we run this code:

Class @Circle
{
//Definition members
  Real _.center.x_;
  Real _.center.y_;
  Real _.radius;

//Auxiliar members
  Real _.perimeter;
  Real _.area;
  
//Basic Constructor 
  Static @Circle New(
    Real x,  //First coordinate of center 
    Real y,  //Second coordinate of center 
    Real r)  //Radius
  {
    @Circle new =
    [[
      Real _.center.x_ = x;
      Real _.center.y_ = y;
      Real _.radius = r;
      //Auxiliuar members definition
      Real _.perimeter = 2*Pi*r;
      Real _.area = Pi*r^2
    ]]
  };
//Derivate constructor
  Static @Circle Random(
   Real min.x, Real max.x,
   Real min.y, Real max.y,
   Real min.r, Real max.r)
  {
    @Circle::New(Rand(min.x,max.x),
                 Rand(min.y,max.y),
                 Rand(min.r,max.r))
  };

//Returns true if the point (x,y) is inside the circle
Real includes(Real x, Real y)
{
  (x-_.center.x_)^2+(y-_.center.y_)^2<=_.radius^2
};
Real outsides(Real x, Real y){ Not(includes(x,y)) }
};

@Circle c1 = @Circle[[0,1,1]];

TOL break down. This a syntax error in the last line that makes TOL breaks down.

Change History (6)

comment:1 Changed 15 years ago by Víctor de Buen Remiro

Status: newaccepted

Thanks for reporting

comment:2 Changed 15 years ago by Víctor de Buen Remiro

Description: modified (diff)
Milestone: OOP Implementation

comment:3 Changed 15 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: acceptedclosed

SVN trunk version works fine. So next binary release will solve this problem.

comment:4 Changed 15 years ago by Víctor de Buen Remiro

(In [2020]) Fixed #864
BVMat::Set2triplet methods are removed
Built-in function Matrix SetMat has been generalized as internal_builtin_SetMat to be called by built-in function VMatrix Triplet

comment:5 Changed 15 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: closedreopened

Sorry, the commit [2002] was referred to #868

comment:6 Changed 15 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.