Actions
Bug #10
closedErreur interne realocation d'un tableau de réel par via la commande Gosub
Start date:
01/17/2020
Due date:
% Done:
0%
Estimated time:
Affected version:
Description
Dim table#(1,2)
size = 10 : Gosub NewTable // <- Internal error at line 3, column 13
Wait 100 : Cls : Pen 5
size = 5 : Gosub NewTable
Do
Loop : End
NewTable:
{
this.vars.table#_array.array = undefined;
this.vars.table#_array.dim([this.vars.size],0);
}
For i=0 To size
table#(i,0) = i
Pen i : Print i : Wait 10
Next i
Return
Updated by Francois Lionet almost 5 years ago
- Status changed from New to Rejected
- Target version set to 0.9.3
This is a problem in the hack, not in AOZ.
When transpiled, the # in the name of the variable is converted to "_" (as # are not allowed in Javascript). So the path to redim the array should be:
{
this.vars.table__array.array = undefined;
this.vars.table__array.dim([this.vars.size],0);
}
Updated by Baptiste Pillot almost 5 years ago
- source : https://www.amos2.fr/ide/Amos2/Ide/Program/452
- run : https://www.amos2.fr/run/tickleman/10
- result :
1
2
3
4
5
Ok.
Actions