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

Closed 17 years ago

#548 closed defect (fixed)

While command doesn't return a value

Reported by: ftakao Owned by: Víctor de Buen Remiro
Priority: high Milestone:
Component: Kernel Version: 1.1.5
Severity: normal Keywords:
Cc:

Description

According to documentation, the while command should return a value and assign this value to a variable:

Anything While(Real condition, Anything whatToDo)

However, the code below generates an error and doesn't create the returnValue set:

Real continue = 0;
Set returnValue = While(Not(continue),
{

Real Sleep(1);

Text doTest = TclTkMessageBox(SetOfSet(

TclArgSt("-title", "Dialogo TclYesNoQuestion"),
TclArgSt("-message", "¿Deseja sair do while?"),
TclArgSt("-type", "yesno"),
TclArgSt("-icon", "question")

));
Real continue := If(doTest=="yes",1,0);
Set 1,2?

});

Change History (4)

comment:1 Changed 17 years ago by ftakao

Severity: blockernormal

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

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

Well, it seems that the description is obsolete
I will change it

Thank you for report it

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

Status: newassigned

Correct syntax could be something as

Real continue = 0;
While(Not(continue),
{

Real Sleep(1);

Text doTest = TclTkMessageBox(SetOfSet(

TclArgSt("-title", "Dialogo TclYesNoQuestion"),
TclArgSt("-message", "�Deseja sair do while?"),
TclArgSt("-type", "yesno"),
TclArgSt("-icon", "question")

));
Real continue := If(doTest=="yes",1,0)

});

comment:4 Changed 17 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: assignedclosed

This problem has been solved in CVS for HEAD 1.1.7 and 1.1.6 branches

2nd argument of While function must be evaluated with GraAnything and description explain that is a non declarative tag.

Thanks to report it

Note: See TracTickets for help on using tickets.