﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
579	Error in PutValue for Series	Pedro Gea	Víctor de Buen Remiro	"PutValue or := has strange behaviors for Serie.

Here you are some examples with comments in spanish:

/////////////////////////////////////////////////////////////////////////////
// Ejemplo 1
//   El comportamiento de la reasignación varía dependiendo
//   de si se accede previamente a la serie.
//   Supongo que es herencia del TOL Lazy.

Serie s1 = SubSer(Pulse(y2002),y2000,y2004);
Serie s2 = s1;
Serie s1 := SubSer(Pulse(y2003),y2001,y2005);
WriteLn(""\n*** Ejemplo 1 (a) ***"");
WriteLn(""serie  \tfirst    \tlast    \t2003 value:"");
WriteLn(""s1:\t""<<First(s1)<<""\t""<<Last(s1)<<""\t""<<SerDat(s1,y2003));
WriteLn(""s2:\t""<<First(s2)<<""\t""<<Last(s2)<<""\t""<<SerDat(s2,y2003));
// => s1 == s2
//  & First(s1) == First(s2)
//  & Last(s1)  != Last(s2)    ???

Serie f1 = SubSer(Pulse(y2002),y2000,y2004);
Serie f2 = f1;
// --- ¡Cambia el comportamiento tras un acceso! ---
Real SerDat(f2,y2002); 
// ---------------------------------------------------
Serie f1 := SubSer(Pulse(y2003),y2001,y2005);
WriteLn(""\n*** Ejemplo 1 (b) ***"");
WriteLn(""serie  \tfirst    \tlast    \t2003 value:"");
WriteLn(""f1:\t""<<First(f1)<<""\t""<<Last(f1)<<""\t""<<SerDat(f1,y2003));
WriteLn(""f2:\t""<<First(f2)<<""\t""<<Last(f2)<<""\t""<<SerDat(f2,y2003));
// => s1 != s2

//////////////////////////////////////////////////////////////////////////////
// Ejemplo 2
//   Vemos hasta qué punto la reasignación no es volver a asignar.

//   Para evitar que el resultado dependa de cuales son 
//   las fechas inicio y final por defecto, fijamos unas.
Date PutDefaultDates(y2008,y2009);

Serie s3 = Pulse(y2003);
WriteLn(""\n*** Ejemplo 2 (a) ***"");
WriteLn(""serie  \tfirst    \tlast    \t2003 value:"");
WriteLn(""s3:\t""<<First(s3)<<""\t""<<Last(s3)<<""   \t""<<SerDat(s3,y2003));

Serie s3 := Pulse(y2003);
WriteLn(""\n*** Ejemplo 2 (b) ***"");
WriteLn(""serie  \tfirst    \tlast    \t2003 value:"");
WriteLn(""s3:\t""<<First(s3)<<""\t""<<Last(s3)<<""\t""<<SerDat(s3,y2003));

//////////////////////////////////////////////////////////////////////////////"	defect	closed	highest		TimeSetAlgebra	head	critical	fixed		Pedro Gea
