Experimenting with a "StringList" type for simpler handling of string arrays/lists - Heimdall - 12-15-2025
Hey!
I'm quite new to QB64, although I dabbled with some QuickBasic a few decades ago.
It seems that QB64 has no "list" data type, but only arrays. Since I have an irrational fear of arrays, I am experimenting with creating a "StringList" container instead, which behind the scenes is based on arrays, but will keep me away from most of the work related to dealing with array sizes etc. and provides a few nifty functions for handling the list. Specifically, the code adds a type, "StringList", which relies on a 2d array with a defined max size. It might not be the most memory efficient solution, since each array is max'ed at the size of the largest StringList used, but at least in some basic testing it seems to work decently.
Current functions are (not tested extensively, so some of them might be buggy):
- StringList_Init (ListName) - Initialize the stringlist after DIM'ing it
- StringList_AddItem (ListName, String) - Add a new string as the last item
- StringList_InsertItem (ListName, String, Pos) - Insert a new string at a specified index/position
- StringList_RemoveItem (ListName, ItemNo/Index) - Remove the specified item no.
- StringList_SetItem (ListName, ItemNo, String) - Set/replace a specific list item
- StringList_Clear (ListName) - Clear the entire string list
- StringList_GetItem$ (ListName, index) - Get the text at item no./index
- StringList_ItemCount& (sl As StringList) - Return the number of items in the list
- StringList_Text$ (sl As StringList) - Return the entire contents of the stringlist in one string
- StringList_Swap (ListName, indexA, indexB) - Swap two items in the list
- StringList_SaveToFile%% (ListName, filename) - Save the string list to the specified plain text file
- StringList_LoadFromFile%% (ListName, filename) - Load list from the specified plain text file
Before I spend too much time on this, I'd be curious to hear from someone with more QB64 experience, whether this concept is solid and whether something better already exists? I can't imagine that I am the first to try something like this, and maybe there is some big disadvantage, that I haven't yet discovered?
What do you think?
Here's the code as it looks right now:
Code: (Select All)
Type StringList
id As Long
End Type
'==========================================================================
' Subs and Functions
'--------------------------------------------------------------------------
'__________________________________________________________________________
' To limit potential memory issues, do not set too high!
Const SL_MAX_LISTS = 10 ' Maximum number of lists
Const SL_MAX_ITEMS = 1000000 ' Maximum items per list
' Shared storage
Dim Shared SL_Data(1 To SL_MAX_LISTS, 1 To SL_MAX_ITEMS) As String
Dim Shared SL_Count(1 To SL_MAX_LISTS) As Long
Dim Shared SL_Used(1 To SL_MAX_LISTS) As _Byte
'__________________________________________________________________________
' Initialize a StringList
Sub StringList_Init (sl_id As StringList)
Dim i As Long
For i = 1 To SL_MAX_LISTS
If SL_Used(i) = 0 Then
SL_Used(i) = -1
SL_Count(i) = 0
sl_id.id = i
Exit Sub
End If
Next
Print "No free StringList slots!"
End Sub
'__________________________________________________________________________
' Add item to end
Sub StringList_AddItem (sl_id As StringList, txt_str As String)
If SL_Count(sl_id.id) >= SL_MAX_ITEMS Then
Print "Error: List exceeded maximum items."
Exit Sub
End If
SL_Count(sl_id.id) = SL_Count(sl_id.id) + 1
SL_Data(sl_id.id, SL_Count(sl_id.id)) = txt_str
End Sub
'__________________________________________________________________________
' Insert item at position
Sub StringList_InsertItem (sl_id As StringList, txt_str As String, insertAt As Long)
Dim i As Long
If insertAt < 1 Or insertAt > SL_Count(sl_id.id) + 1 Then
Print "Error: Invalid insert sl_index."
Exit Sub
End If
If SL_Count(sl_id.id) >= SL_MAX_ITEMS Then
Print "Error: List exceeded maximum items."
Exit Sub
End If
For i = SL_Count(sl_id.id) To insertAt Step -1
SL_Data(sl_id.id, i + 1) = SL_Data(sl_id.id, i)
Next
SL_Data(sl_id.id, insertAt) = txt_str
SL_Count(sl_id.id) = SL_Count(sl_id.id) + 1
End Sub
'__________________________________________________________________________
' Remove item at sl_index
Sub StringList_RemoveItem (sl_id As StringList, sl_index As Long)
Dim i As Long
If sl_index < 1 Or sl_index > SL_Count(sl_id.id) Then
Print "Error: Invalid remove sl_index."
Exit Sub
End If
For i = sl_index To SL_Count(sl_id.id) - 1
SL_Data(sl_id.id, i) = SL_Data(sl_id.id, i + 1)
Next
SL_Data(sl_id.id, SL_Count(sl_id.id)) = ""
SL_Count(sl_id.id) = SL_Count(sl_id.id) - 1
End Sub
'__________________________________________________________________________
' Replace item at sl_index
Sub StringList_SetItem (sl_id As StringList, sl_index As Long, txt_str As String)
If sl_index < 1 Or sl_index > SL_Count(sl_id.id) Then
Print "Error: Invalid sl_index in SetItem."
Exit Sub
End If
SL_Data(sl_id.id, sl_index) = txt_str
End Sub
'__________________________________________________________________________
' Clear entire list
Sub StringList_Clear (sl_id As StringList)
Dim i As Long
For i = 1 To SL_Count(sl_id.id)
SL_Data(sl_id.id, i) = ""
Next
SL_Count(sl_id.id) = 0
End Sub
'__________________________________________________________________________
' Get item at sl_index
Function StringList_GetItem$ (sl_id As StringList, sl_index As Long)
If sl_index < 1 Or sl_index > SL_Count(sl_id.id) Then Exit Function
StringList_GetItem = SL_Data(sl_id.id, sl_index)
End Function
'__________________________________________________________________________
' Item count
Function StringList_ItemCount& (sl_id As StringList)
StringList_ItemCount = SL_Count(sl_id.id)
End Function
'__________________________________________________________________________
' Full text (all items)
Function StringList_Text$ (sl_id As StringList)
Dim i As Long
Dim result As String
For i = 1 To SL_Count(sl_id.id)
result = result + SL_Data(sl_id.id, i)
If i < SL_Count(sl_id.id) Then result = result + Chr$(10)
Next
StringList_Text = result
End Function
'__________________________________________________________________________
' Swap two items
Sub StringList_Swap (sl_id As StringList, sl_indexA As Long, sl_indexB As Long)
Dim tmp As String
If sl_indexA < 1 Or sl_indexA > SL_Count(sl_id.id) Then Exit Sub
If sl_indexB < 1 Or sl_indexB > SL_Count(sl_id.id) Then Exit Sub
If sl_indexA = sl_indexB Then Exit Sub
tmp = SL_Data(sl_id.id, sl_indexA)
SL_Data(sl_id.id, sl_indexA) = SL_Data(sl_id.id, sl_indexB)
SL_Data(sl_id.id, sl_indexB) = tmp
End Sub
'__________________________________________________________________________
' Save StringList to file
Function StringList_SaveToFile%% (sl_id As StringList, sl_filename As String)
Dim i As Long
Dim ff As Integer
' Reject empty sl_filename
If Len(sl_filename) = 0 Then
StringList_SaveToFile = _FALSE
Exit Function
End If
' Get a free file handle
ff = FreeFile
' Try opening file
Open sl_filename For Output As #ff
' If OPEN failed, QB64 sets ERR
If Err <> 0 Then
StringList_SaveToFile = _FALSE
Exit Function
End If
' Write items
For i = 1 To SL_Count(sl_id.id)
Print #ff, SL_Data(sl_id.id, i)
Next
Close #ff
StringList_SaveToFile = _TRUE
End Function
'__________________________________________________________________________
' Load StringList from file
Function StringList_LoadFromFile%% (sl_id As StringList, sl_filename As String)
Dim ff As Integer
Dim lineIn As String
' Validate sl_filename
If Len(sl_filename) = 0 Then
StringList_LoadFromFile = _FALSE
Exit Function
End If
' File must exist
If _FileExists(sl_filename) = 0 Then
StringList_LoadFromFile = _FALSE
Exit Function
End If
' Clear current contents
StringList_Clear sl_id
' Open file safely
ff = FreeFile
Open sl_filename For Input As #ff
' Check for open failure
If Err <> 0 Then
StringList_LoadFromFile = _FALSE
Exit Function
End If
' Read file
Do Until EOF(ff)
If SL_Count(sl_id.id) >= SL_MAX_ITEMS Then Exit Do
Line Input #ff, lineIn
SL_Count(sl_id.id) = SL_Count(sl_id.id) + 1
SL_Data(sl_id.id, SL_Count(sl_id.id)) = lineIn
Loop
Close #ff
StringList_LoadFromFile = _TRUE
End Function
And here's a quick, messy example of some the functions:
Code: (Select All)
' First DIM the lists
Dim L As StringList
Dim N As StringList
' Remember to initialize the lists
StringList_Init L
StringList_Init N
' Add some test items to the stringlist:
StringList_AddItem L, "One"
StringList_AddItem L, "Two"
StringList_AddItem L, "Three"
' Add items to numeric list
'For i = 1 To 10
'StringList_AddItem N, Str$(i)
'Next
StringList_AddItem N, "1"
StringList_AddItem N, "2"
StringList_AddItem N, "3"
StringList_AddItem N, "4"
StringList_AddItem N, "5"
StringList_AddItem N, "6"
StringList_AddItem N, "7"
StringList_AddItem N, "8"
StringList_AddItem N, "9"
StringList_AddItem N, "10"
' Manipulate text list
StringList_InsertItem L, "Inserted", 2
StringList_SetItem L, 3, "Replaced"
StringList_RemoveItem L, 1
StringList_AddItem N, "11"
StringList_AddItem N, "12"
StringList_AddItem N, "13"
Print "Text List:"
Print StringList_Text(L)
Print , "Count is: " + Str$(StringList_ItemCount(L))
Print
Print "Numeric List:"
Print StringList_Text(N)
Print , "Count is: " + Str$(StringList_ItemCount(N))
If StringList_SaveToFile(N, "myexport-tempdelete.txt") = _TRUE Then
Print "All saved!"
Else
Print "Not saved!"
End If
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - bplus - 12-16-2025
Yeah I had some ideas on this too 
acopy copys an array using memory for speed.
addend could have been called append.
insert and delete I think is just what you think.
join$ makes the array a giantstring but with delimiter between items.
joint$ is same thing for slices, sequential chunks of the array.
reverse and show are just what you think, i think.
slice is like Python mid$ for string only this is for a chunk of array.
Sort is a version of qSort
Split is one of the handiest tools ever, spliting a delimited string into an array, the oopposite of join$
and unique removes all redundant items in an array.
Welcome to the forum! @Heimdall
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - a740g - 12-16-2025
@Heimdall, I explored this approach while I was working on QBDS. However, I ultimately decided against it because I needed a dynamically resizing list. One of the key issues with 2D arrays is that they cannot be resized properly while preserving their contents (i.e., elements are not shifted during resizing; resizing a 1D array while maintaining its contents works perfectly, though). If you do not care about resizing or expanding your implementation, then it is ok I think.
For more details see https://qb64phoenix.com/forum/showthread.php?tid=4147
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - SpriggsySpriggs - 12-16-2025
One could even use SQLite, if they so desired. Not sure how close that gets you to what you are exploring here, though.
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - Pete - 12-16-2025
I use User Defined Types a lot these days, but I'm very disappointed of the lack of ability for a UDT to accept arrays. Another disappointment is the inability to preserve multidimensional arrays.
Let's say we want to make a tabbed program like a browser. Hmm, we switch tabs, but we want to run the same routine, but with different values. Well global or shared multi-dim arrays would allow use to do so... a$(1, n) ,a$(2, n), but if we needed to increase or decrease the array size(s), we would need a make a subroutine. That's doable enough, but it's a shame _Preserve doesn't work with multi-dims. (I use _Preserve on single-dim arrays extensively, and it's very much appreciated). Now a different route is we make everything universal using UDTs and pass those and any needed single-dim arrays to the sub calls. No need for global/shared. We still have two tabs that need to remember different variable values, and now the only way to accomplish this is a memory subroutine when switching tabs. It would either have to use _Mem or contain its own equivalent arrays to memorize the values assigned to each variable in both tabs. Upon switching, it would repopulate all the arrays and UDT variables to the active tab, while retaining the other tab values for switching back. Without using the _mem feature, this would best be done with local single-dim arrays, unless the program uses multi-dim arrays when, again, we'd have that extra preserve subroutine to make for the missing multi-dim _Preserve function. I figure we could name this sub the: MyPITA_Routine
Just sayin'
Pete
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - Dimster - 12-16-2025
So Pete, could combining arrays and files work to achieve for redimming multidimensional arrays? For example an array(a,b.c) rather than using _preserve, save the array data into 3 separate files ..FileA, FileB and FileC... do your thing with the array and then repopulate the array from the files. Or what about a kind of concatenation, for example a$(1,n), a$(2,n) would combine using decimal values so a$(1.2,n.n) where the values of the 2nd array are combined as a decimal value.
DISCLAIMER: This idea was just off the top of my head without a sober 2nd thought or a closer read of your post
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - Pete - 12-16-2025
@Dimster
Yes, I think (in theory because I haven't tried this) either would work, but both get cumbersome in apps that reuire many variables.
Here is an example of using 2-dim arrays to track single-dim arrays over two screens. Each screen contains 5 numbers you can drag with the mouse. Flip to the other tab screen by pressing F1 for tab #1, or F2 for tab #2.
Notice that you can arrange the numbers on the screen like 1 to 5, flip tot he other screen and arrange those from 5 to 1, and when you flip back and forth these arrangements will be remembered and properly displayed, all using the same routine by just repopulating the variables from the memory subroutine.
Code: (Select All)
Type MouseVar
x As Integer
y As Integer
lb As Integer
rb As Integer
mb As Integer
mw As Integer
clkcnt As Integer
caps As Integer
shift As Integer
ctrl As Integer
alt As Integer
prevx As Integer
prevy As Integer
drag As Integer
sbar As Integer
sbRow As Integer
oldsbRow As Integer
ThumbTop As Integer
ThumbSize As Integer
ThumbDrag As Integer
autokey As String
End Type
Dim m As MouseVar
Type ControlVars
notbs As Integer ' Number of tabs.
noc As Integer ' Number of characters
oldtabx As Integer
tabx As Integer
End Type
Dim c As ControlVars
c.tabx = 1: c.notbs = 2: c.noc = 5
ReDim tracker(c.notbs)
t$ = "Tab #1": _Title t$
Do
If c.tabx <> c.oldtabx Then ' Print the tab number in the title bar
If c.tabx = 1 Then t$ = "Tab #1" Else t$ = "Tab #2"
_Title t$
End If
If tracker(c.tabx) = 0 Then ' Populate characters to screen when a tab is opened for the first time.
Cls
ReDim y(c.noc), x(c.noc)
For i = 1 To c.noc
i$ = LTrim$(Str$(i))
Do
y(i) = Int(Rnd * _Height) + 1: x(i) = Int(Rnd * _Width) + 1
For j = 1 To i - 1
If y(j) = y(i) And x(j) = x(i) Then flag = 1: Exit For
Next
If flag = 0 Then Exit Do Else flag = 0
Loop
Locate y(i), x(i): Print i$;
Next
tracker(c.tabx) = 1
Else ' Show the characters on tab screen, which are now in array memory.
Cls
For i = 1 To c.noc
i$ = LTrim$(Str$(i))
Locate y(i), x(i): Print i$;
Next
End If
Do
_Limit 60
Mouse_Keyboard m, b$
Select Case b$
Case Chr$(0) + Chr$(59) ' F1 Switch to tab #1
c.tabx = 1
Case Chr$(0) + Chr$(60) ' F2 Switch to tab #2
c.tabx = 2
Case Chr$(27)
System
End Select
Select Case m.lb
Case -1 ' Left mouse button clicked.
For i = 1 To c.noc
If m.y = y(i) And m.x = x(i) Then k = i: Exit For
Next
Case 2: If k Then k = 0 ' Left mouse button released.
End Select
If m.drag And k <> 0 Then
For i = 1 To c.noc
If i <> k Then
If m.y = y(i) And m.x = x(i) Then flag = 1: Sound 500, .1: Exit For ' Do not allow numbers to overlap on drag.
End If
Next
If flag = 0 Then ' Move character.
Locate y(k), x(k): Print " ";
Locate m.y, m.x: Print LTrim$(Str$(k));
y(k) = m.y: x(k) = m.x
Else
flag = 0
End If
End If
If c.oldtabx And c.oldtabx <> c.tabx Then ' Switch tabs (F1 or F2 key was pressed).
My_PITA_Routine c, y(), x()
c.oldtabx = 0
Exit Do
End If
c.oldtabx = c.tabx
Loop
Loop
Sub My_PITA_Routine (c As ControlVars, y(), x()) ' Memory subroutine.
Static memy(2, 5), memx(2, 5)
For i = 1 To c.noc
memy(c.oldtabx, i) = y(i)
memx(c.oldtabx, i) = x(i)
Next
For i = 1 To c.noc
y(i) = memy(c.tabx, i)
x(i) = memx(c.tabx, i)
Next
End Sub
Sub Mouse_Keyboard (m As MouseVar, b$)
Static z1
If Len(m.autokey) Then
b$ = Mid$(m.autokey + ",", 1, InStr(m.autokey$ + ",", ",") - 1)
m.autokey = Mid$(m.autokey, InStr(m.autokey$ + ",", ",") + 1) ' Don't add "," tomid$() portion or the last key will always be a comma.
Else
b$ = InKey$
End If
m.prevx = m.x: m.prevy = m.y
If m.mw Then m.mw = 0
While _MouseInput
m.mw = m.mw + _MouseWheel: If m.mw Then m.mw = m.mw \ Abs(m.mw) ' Limit to 1 or -1 for up or down.
Wend
m.x = _MouseX
m.y = _MouseY
If z1 Then If Abs(Timer - z1) > .25 Then z1 = 0: m.clkcnt = 0
Select Case m.lb
Case 2: m.lb = 0 ' Click cycle completed.
Case 1: If _MouseButton(1) = 0 Then m.lb = 2: m.drag = 0: m.ThumbDrag = 0 ' Button released.
Case -1: m.lb = 1 ' Button held down.
Case 0: m.lb = _MouseButton(1)
End Select
Select Case m.rb
Case 2: m.rb = 0 ' Click cycle completed.
Case 1: If _MouseButton(2) = 0 Then m.rb = 2 ' Button released.
Case -1: m.rb = 1 ' Button held down.
Case 0: m.rb = _MouseButton(2)
End Select
Select Case m.mb
Case 2: m.mb = 0 ' Click cycle completed.
Case 1: If _MouseButton(3) = 0 Then m.mb = 2 ' Button released.
Case -1: m.mb = 1 ' Button held down.
Case 0: m.mb = _MouseButton(3)
End Select
If Abs(m.lb) = 1 Then
If m.lb = -1 Then z1 = Timer: m.clkcnt = m.clkcnt + 1
If m.prevx And m.prevx <> m.x Or m.prevy And m.prevy <> m.y Then
If m.x <> m.prevx Then m.drag = Sgn(m.x - m.prevx) ' Prevent zero which can occur if mouse moves off row when being draged horizontally.
End If
End If
If _KeyDown(100301) Then m.caps = -1 Else If m.caps Then m.caps = 0
If _KeyDown(100303) Or _KeyDown(100304) Then m.shift = -1 Else If m.shift Then m.shift = 0
If _KeyDown(100305) Or _KeyDown(100306) Then m.ctrl = -1 Else If m.ctrl Then m.ctrl = 0
If _KeyDown(100307) Or _KeyDown(100308) Then m.alt = -1 Else If m.alt Then m.alt = 0
End Sub
Now a gripe of mine is this:
Because it uses STATIC in the memory sub, we can't do anything to modify the array. Hell, we can't even use variables in the ( ) or a c++ compilation error will occur. That because STATIC means static! The other option, for greater flexibility, would be to dim the two-dim memory arrays in the main as global or shared. That's a bitch, because we will only be using them in one sub. Now other than using _Mem, yes, I might be missing some other angle, as I hardly ever work with multi-dim arrays.
EDIT:
Okay, just for fun. How to change the size of a two-dim array without using the dysfunctional _Preserve statement...
Code: (Select All)
ind1 = 1: noa = 5
ReDim array$(ind1, noa)
For i = 1 To 5
array$(ind1, i) = "Pete-" + LTrim$(Str$(i))
Next
GoSub display
Do
Print "Press 1 to add to an array or 2 to delete from an array: ";
Do
_Limit 30
b$ = InKey$
If Len(b$) Then
If b$ = "1" Then AddDelete = 1: Print b$
If b$ = "2" Then AddDelete = -1: Print b$
If b$ = Chr$(27) Then End
End If
If AddDelete Then
If AddDelete = 1 Then Line Input "Name of array element: "; MyInput$
If AddDelete = -1 Then
Line Input "Press 0 to delete last added array or pick a number: "; MyInput$
If Val(MyInput$) Then ArrayNumber = Val(MyInput$): AddDelete = -2
End If
GoSub Add_Delete
GoSub display
Exit Do
End If
Loop
AddDelete = 0: Print
Loop
Add_Delete:
Select Case AddDelete
Case 1 ' Add.
noa = noa + 1: x$ = ""
ReDim temp$(ind1, noa)
For i = 1 To noa - 1
temp$(ind1, i) = array$(ind1, i)
Next
ReDim array$(ind1, noa)
For i = 1 To noa
hold$ = temp$(ind1, i)
array$(ind1, i) = x$
x$ = hold$
Next
x$ = "": array$(ind1, 1) = MyInput$: Erase temp$
Case -1 ' Delete.
If noa > 0 Then
ReDim temp$(ind1, noa - 1)
For i = 1 To noa
temp$(ind1, i - 1) = array$(ind1, i)
Next
noa = noa - 1
ReDim array$(ind1, noa)
For i = 1 To noa
array$(ind1, i) = temp$(ind1, i)
Next
Erase temp$
End If
Case -2 ' Delete numbered array.
noa = noa - 1
ReDim temp$(ind1, noa)
For i = 1 To noa
If i >= ArrayNumber Then temp$(ind1, i) = array$(ind1, i + 1) Else temp$(ind1, i) = array$(ind1, i)
Next
ReDim array$(ind1, noa)
For i = 1 To noa
array$(ind1, i) = temp$(ind1, i)
Next
Erase temp$
End Select
Return
display:
Cls
For i = 1 To noa
Print i; array$(ind1, i)
Next
Return
Other algorithms would need to be added to add and subtract to the end, or add to the middle, but this lesser demo should be good enough to show how it's basically achievable. I could also show you guys single-dim arrays, using preserve, and you'd see what a nice little code saver it is.
Pete
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - bplus - 12-16-2025
I confess when I first looked at Heimdall's original post all I saw were array routines, I totally missed this part:
Quote:It seems that QB64 has no "list" data type, but only arrays. Since I have an irrational fear of arrays, I am experimenting with creating a "StringList" container instead, which behind the scenes is based on arrays, but will keep me away from most of the work related to dealing with array sizes etc. and provides a few nifty functions for handling the list.
Looking over again Heimdall's routines it seems a hell of allot more work to say:
MyArr(n) = 200
value = MyArr(n)
Translate those 2 easy straight forward statements into Heimdall's StringList routines, yikes!
Apologies @Heimdall if I am not empathic to your phobia for arrays, it just strikes me as a strange way to overcome that phobia because you are still using arrays to store info but are using an even more complicated system.
Kudos though for not letting fear prevent you from coding!
I have learned that the best way to overcome a phobia is to gently and slowly limit exposure to the fear producing obstacle until you are acclimated to it's presence. I have a thing about spiders but drawing them in QB64 has done much for the heebee geebee's in fact I am facinated by their structure, when I know they aren't going to crawl all over me I will study one, One!
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - Pete - 12-16-2025
And speaking of phobias... https://qb64phoenix.com/forum/showthread.php?tid=4218
RE: Experimenting with a "StringList" type for simpler handling of string arrays/lists - Heimdall - 12-17-2025
Thanks for all your comments and links - it's an interesting discussion to follow.
(12-16-2025, 10:15 PM)bplus Wrote: Apologies @Heimdall if I am not empathic to your phobia for arrays, it just strikes me as a strange way to overcome that phobia because you are still using arrays to store info but are using an even more complicated system. Indeed, there's a reason why I call it an irrational fear . I am just much more used to working with automatically resizing lists than arrays in other languages (although I recognize that there is something "foundational" about arrays in programming). But putting in the work once, to mimic various "list" functions that aren't built-in, doesn't seem like a bad one-time investment at least to me. Ultimately, the common denominator that I see, is the need to have more functions to work with arrays. It would be great if QB64 had such functions built in.
Do you by the way share your array functions anywhere? If so, I'd be interested in having a look. Maybe they will reduce my phobia.
@Pete: I can't access your link. It seems there is a hidden VIP section, which my 2 forum posts don't qualify me for
|