So I'm in qvscript and trying to fill an empty table with new stuff through a loop and an if-statement. If the if-statement is true I call a sub (that I put first in the script) that creates a string with variables from the if-statement. So far so good. Then my problem is creating an empty table and filling it with new strings for each time the if-statement is fullfilled. Ideally I would like that the table had two columns, one for the new string coming in, and if the same string comes up twice, in the next column I would like it to be counted. I think this is known as a hash table... sort of
So, how to do this? Do I create the empty table in the beginning of the script or in the Sub where each of the new strings are created? Any help would be much appreciated!
Can't get it to work though. I'm trying sort of like this:
//Creating the empty table
Load '' as Field1, '' as Field2
//My sub where i want to fill the table every time its called. Note that I want to fill one of the fields with pos, which is a string that is different each time it's called. Eventually I would like the second Field to have the count of the different pos coming in.
let pos=a & ',' & b;
load pos as Field1, 123 as Field2
//My loop where my sub get's called when a certain condition is met.
for i=0 to 100
if s=t then
Not sure if this is comprehensible, but I'll throw it out anyway!