I have made some progress, but still not what I want:
Code:
'tables.txt now includes the array names on a separate line before the array items
open "C:\LibBas\_MyLibBas\matchmaker\tables.txt" for input as #tbl
for j = 1 to 4
input #tbl, xx$ 'get array name
print xx$
call getTable xx$()
next
for j = 1 to 7 'checking the arrays
print j,religion$(j),race$(j),pet$(j),television$(j) 'shows only blanks
next
close #tbl
end
sub getTable arr$()
input #tbl,x$ 'get array item
n=1
while word$(x$,n) <> ""
arr$(n) = word$(x$,n) 'this seems to work
print, arr$(n) 'show the array item
n=n+1
wend
end sub
revised tables.txt file:
Code:
religion$
Buddist Catholic Muslim Mormon Protestant Other None
race$
White Black Asian Polynesian Hispanic
pet$
Birds Cats Dogs Fish
television$
Drama Comedy Game Cops Mystery Sci-Fi Reality
r.m.