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

#100 closed defect (fixed)

Not recognize grammar inside structures

Reported by: jlaybar Owned by: danirus
Priority: normal Milestone:
Component: Kernel Version: head
Severity: normal Keywords:
Cc:

Description

TOL can not recognize the grammar inside the structure

Struct Estructura
{
Real campo
};

Set fun( Matrix mat)
{

Estructura( MatDat(mat,1,1) )

};

Matrix mat = Rand(1,2,0,1);

Real salida = fun(mat)->campo;

Change History (3)

comment:1 Changed 21 years ago by danirus

Status: newassigned
Summary: Not recognize grammar inside structuresNot recognize grammar inside structures

comment:2 Changed 21 years ago by danirus

Resolution: fixed
Status: assignedclosed

This bug has been just resolved.
Now Tol can distinguish the nature of the parameters used inside an structure call.
To see it in action we can load the InitLibrary (in order to ensure that the
changes work properly) and also trying to compile next code:
_
Struct Estructura { Real numero, Text texto };

Set fun( Matrix mat) {

Estructura(MatDat(mat,1,1),"Hola")

};

Set miSet = Estructura(1, "Hola");
Matrix mat = Rand(1,2,0,1);
Real salida = fun(mat)->numero;
_
If somebody detect any indirect effect, please reopen this bug as soon as possible.
I hope there isn't although all is possible... ;-)

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

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000100
Note: See TracTickets for help on using tickets.