We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82467d8 commit e2413b1Copy full SHA for e2413b1
ChangeLog
@@ -1,3 +1,7 @@
1
+2023-06-18 (12.27)
2
+ COMMON: Fix redim regression
3
+ PLUGINS: Added mechanism for cleaning up resources when the associated map falls out of scope
4
+
5
2023-05-12 (12.27)
6
CONSOLE: Fix image save
7
ANDROID: Fix download error when there are duplicate scratch.bas files
samples/distro-examples/tests/array.bas
@@ -426,4 +426,15 @@ p(asc("|")) = 1
426
p(asc("}")) = 1
427
p(asc("~")) = 1
428
429
+'
430
+' https://www.syntaxbomb.com/smallbasic/redim-why-to-keep-old-versons/
431
432
+a = [0,1,2,3,4,5,6,7,8,9,10,11]
433
+redim a(11) : if a != [0,1,2,3,4,5,6,7,8,9,10,11] then throw str(a)
434
+redim a(1, 11) : if a != [0,1,2,3,4,5,6,7,8,9,10,11;0,0,0,0,0,0,0,0,0,0,0,0] then throw str(a)
435
+redim a(2, 10) : if a != [0,1,2,3,4,5,6,7,8,9,10;11,0,0,0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0,0,0,0] then throw str(a)
436
437
+redim a(10) : if a != [0,1,2,3,4,5,6,7,8,9,10] then throw str(a)
438
+redim a(0 to 7): if a != [0,1,2,3,4,5,6,7] then throw str(a)
439
+redim a(0 to 1): if a != [0,1] then throw str(a)
440
src/common/blib.c
@@ -210,8 +210,6 @@ void cmd_dim(int preserve) {
210
}
211
if (!preserve || var_p->type != V_ARRAY) {
212
v_new_array(var_p, size);
213
- } else if (v_maxdim(var_p) != dimensions) {
214
- err_matdim();
215
} else {
216
// preserve previous array contents
217
v_resize_array(var_p, size);
0 commit comments