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

Closed 19 years ago

#355 closed defect (invalid)

A problem whith CalInd sintax

Reported by: Manuel Locubiche Malaxechevarria Owned by: Víctor de Buen Remiro
Priority: lowest Milestone:
Component: Kernel Version: head
Severity: major Keywords:
Cc:

Description

We have found a problem whith CalInd;

Serie pr2 = CalInd(In(y2006m01d09,y2006m04d10)*(CtLV-Day
(y2006m01d30),Diario));

Serie pr3 = CalInd(In(y2006m01d09,y2006m04d10)*(CtLV-Day
(y2006m01d30)),Diario);

If you execute pr2, you don't find some error. In pr2 we have tried to obtain the

result like in pr3 and the result is diferent an whith value 1 in saturday and sunday.

Change History (2)

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

Owner: changed from danirus to Víctor de Buen Remiro

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

Resolution: invalid
Status: newclosed

I'm afraid there are nothing wrong if I'm not confused. I will try to explain it.

In first expression

Serie pr2 = CalInd(In(y2006m01d09,y2006m04d10)*(CtLV-Day
(y2006m01d30),Diario));

CalInd receives just one argument (so, the second argument is taken by default
as C). This first argument is the product of two TimeSet objects

In(y2006m01d09,y2006m04d10) * (CtLV-Day(y2006m01d30),Diario)

Second one is a comma-separated composed expression valid in TOL like in C and
C++ languages

CtLV-Day(y2006m01d30),Diario = Diario

due to a,b,...,z is taken as z in TOL, even most TOL user unknown this feature.

So this expression is equal to

Serie pr2 = CalInd(In(y2006m01d09,y2006m04d10)*Diario) =
CalInd(In(y2006m01d09,y2006m04d10), C) ;

that has value 1 in all the interval, samedays and sundays not excluded

It's all right now?

Note: See TracTickets for help on using tickets.