﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
367	a problem with Structs? TOLBase falls down	imendez	Víctor de Buen Remiro	"Hi,
the next code yields a TOLBase crash. Cuiously, the first time you compile the
code everything works right, but when you decompile and compile again, TOLBase
falls down.
Well, not everything works right, because if you make a table from ""SInc"", the
columns has no names.
In fact, I'm doing several trials and TOL has a very strange behaviour with the
Structs.
Even, in 13th March nigthly built version, ""SInc"" couldn't be created.

/////////////////////////////////////////////////////////////////
Struct IncDecSt
(
  Real MinForecast,
  Real MaxForecast,
  Real MinIncEjemp,
  Real MaxIncEjemp,
  Real MinIncPorc,
  Real MaxIncPorc
);
Set  SInc = SetOfSet( IncDecSt(0, 2, 0, 0, ?, ?),
                      IncDecSt(2, 5, 0, 1, ?, ?));
Text minForecast = SqlFormatReal(SInc[1]->MinForecast, GesAct);
Text maxForecast = SqlFormatReal(SInc[2]->MaxForecast, GesAct);
/////////////////////////////////////////////////////////////////

Also, the next code returns an error:

/////////////////////////////////////////////////////////////////
Struct IncDecSt
(
  Real MinForecast,
  Real MaxForecast,
  Real MinIncEjemp,
  Real MaxIncEjemp,
  Real MinIncPorc,
  Real MaxIncPorc
);
Set  SInc = SetOfSet( IncDecSt(0, 2, 0, 0, ?, ?),
                      IncDecSt(2, 5, 0, 1, ?, ?));
Set s1 = SInc[1];
Set s2 = SInc[2];
Real x = s1->MinForecast;
Real y = s2->MaxForecast;
  Text minForecast = SqlFormatReal(x, GesAct);
  Text maxForecast = SqlFormatReal(y, GesAct);
/////////////////////////////////////////////////////////////////

The error message is:

/////////////////////////////////////////////////////////////////

ERROR: [40] MinForecast no es un campo válido para la estructura maxForecast

ERROR: [41] MinForecast no es campo de la estructura maxForecast

Warning: [8] La función Field (ó -> ) ha fallado en : 
s1->MinForecast

ERROR: [42] x no se pudo crear.

ERROR: [43] MaxForecast no es un campo válido para la estructura maxForecast

ERROR: [44] MaxForecast no es campo de la estructura maxForecast

Warning: [9] La función Field (ó -> ) ha fallado en : 
s2->MaxForecast

ERROR: [45] y no se pudo crear.

ERROR: [46] x no es un objeto valido para el tipo Real.

ERROR: [47] Argumentos erróneos para Text SqlFormatReal (Real rea, Real gestor)

ERROR: [48] minForecast no se pudo crear.

ERROR: [49] y no es un objeto valido para el tipo Real.

ERROR: [50] Argumentos erróneos para Text SqlFormatReal (Real rea, Real gestor)

ERROR: [51] maxForecast no se pudo crear.
/////////////////////////////////////////////////////////////////

Regards"	defect	closed	highest		Various	head	blocker	duplicate		
