having a problem understanding how ewon basic uses arrays, trying to DIM a two dimensional array type of string. I need to store the tag name and index to be able to lookup the info later in the program.
TagArray$( First Dim, Sec Dim) but I dont think thats how basic 2 works
tried, so I tried just making two arrays code below with no luck.
n% = GETSYS PRG, “NBTAGS” // Get all of tags as an int
Print "Number of Tags: " + str$(n%)
DIM TagInfo$(20,20)
FOR i% = 0 TO (n% - 1)
SETSYS TAG, “load”, -i% // -i% for index correction
t$ = GETSYS TAG, “name” // Load tagName (includes Room:Tag)
i$ = GETSYS TAG, “id” // Load Tag Index
// save tag and index for updating polled values from db
TagInfo$(i% +1,1) = t$
TagInfo$(i% +1,2) = i$
Print "Full Tag name: " + t$ + " - Tag Index: " + i$
ONCHANGE t$, “@updateServer(’ " + t$ + " ', ’ " + i$ + " ’ )”
NEXT i%