Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is IstringMap interface the best to find a string in a list?
#13
I was thinking about creating a global array at QM launch, so it would be available for all searches .

For index in IStringMap, i was thinking about

using a list like (in test.txt)

"wordone" "1"
"wordtwo" "2"
wordthree" "3"
and so on.

Not much work.

Would this code work, and/or does it make sense?

str test2.getfile("$desktop$\test.txt")
IStringMap m=CreateStringMap(1|2)
m.AddList(test2)

_s="somethingtotest"
int index=m.Get(_s)
out index
Sel index
case 1: action1
case 2: action2
case else end
Right code?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)