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 21 years ago

Closed 21 years ago

Last modified 18 years ago

#166 closed defect (fixed)

I can't modify default dates of Tol

Reported by: imendez Owned by: danirus
Priority: normal Milestone:
Component: TimeSetAlgebra Version: 1.1.1
Severity: normal Keywords:
Cc:

Description

This failure merges from an ambiguous behaviour of SubSer reported in Bug #79
that I'm going to comment soon in tol-users list.

With this code:


Date DefFirst;
Serie srSubBeg = SubSer(CalInd(WD(7), Diario), TheBegin, y2004);
Date FirstDate = First(srSubBeg);

TolBase shows DefFirst == y2004 (in this example) and FirstDate == y2004 (the
default initial date). But if you try to modify DefFirst:


Date (DefFirst := y2002);
Date DefFirst;
Serie srSubBeg = SubSer(CalInd(WD(7), Diario), TheBegin, y2004);
Date FirstDate = First(srSubBeg);

TolBase shows DefFirst == y2002 but FirstDate == y2004. In fact, if I look for the
default initial date in TolBase option's, it's y2004 instead of y2002.

Change History (3)

comment:1 Changed 21 years ago by danirus

Status: newassigned

comment:2 Changed 21 years ago by danirus

Resolution: fixed
Status: assignedclosed

This bug has been just resolved.
A bad definition of some static Tol elements, those representing DefFirst and
DefLast of Date type, was avoiding a ":=" (PutValue function of spfuninst.cpp)
operation, used to change the value of Tol variables.

Both, DefFirst and DefLast variables, were being created as BGraConstant<BDate>
objects, what means, they were Tol constant variables.
Now, we define them as BGraParameter<BDate>, that represents something that
could be changed by the user with := operations.

If you try to execute the code above, you see a correct FirstDate value.

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

bug_file_loc: http://www.tol-project.org
Note: See TracTickets for help on using tickets.