11-19-2024, 09:56 AM
Yumba,
I know of 4 array types in Small Basic:
- - - - -
sbArrayName[i] = x; ( sbArrayName[i][j] = x ) - slow one-dimensional and multi-dimensional arrays;
arrayName = LDArray.Create(maxSize); ( LDArray.SetValue(arrayName, i, x) ) - the fastest one-dimensional array;
fastArrayName = LDFastArray.Add(); ( LDFastArray.Set(fastArrayName, i , x) ) - fast multi-dimensional array;
LDList.Add(listName, x); ( LDList.SetAt(listName, i, x) ) - fast and convenient type.
- - - - -
Each of these types has its own advantages and disadvantages.
You can choose the type that best suits your task.
I know of 4 array types in Small Basic:
- - - - -
sbArrayName[i] = x; ( sbArrayName[i][j] = x ) - slow one-dimensional and multi-dimensional arrays;
arrayName = LDArray.Create(maxSize); ( LDArray.SetValue(arrayName, i, x) ) - the fastest one-dimensional array;
fastArrayName = LDFastArray.Add(); ( LDFastArray.Set(fastArrayName, i , x) ) - fast multi-dimensional array;
LDList.Add(listName, x); ( LDList.SetAt(listName, i, x) ) - fast and convenient type.
- - - - -
Each of these types has its own advantages and disadvantages.
You can choose the type that best suits your task.