Do you know?
#1
Do you know?

That SmallBASIC not only does not need REDIM PRESERVE, because REDIM does that but also allows INSERT, DELETE, APPEND to arrays (without REDIM)?
B += x
Reply
#2
Do you know?

Arrays can be copied as easily as variables if a is an array and you want a copy c of a, simple as:
c = a
B += x
Reply
#3
Do you know,

about the very handy built-in SPLIT command?

SPLIT string, delimiters, word(), [, pairs] [USE expr]


Code:
s="/etc/temp/filename.ext"
SPLIT s, "/.", v()
FOR i=0 TO UBOUND(v)
 PRINT i;" [";v(i);"]"
NEXT


Code:
displays:
0 []
1 [etc]
2 [temp]
3 [filename]
4 [ext]

Notice in example, SPLIT used both dividers / and .

[, pairs] would be like {}, [], ()

USE, I am less familiar with but in example under USE, you can USE TRIM to remove spaces with SPLIT.

There is also a complementary JOIN command that works in opposite direction as SPLIT.
B += x
Reply