Locate String in Array

  • yorn_panha
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago - 9 years 1 month ago #17090 by yorn_panha
Locate String in Array was created by yorn_panha
ex: ARR<1,1>="A"
ARR<2,1>="B"
ARR<3,1>="C"
ARR<1,2>="1"
ARR<2,2>="2"
ARR<3,2>="3"
LOCATE "A" IN ARR<?,?> SETTING index THEN
result=ARR<index,2>
END
what values should i put in the ? mark? result should be "1"
Last edit: 9 years 1 month ago by yorn_panha.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
9 years 1 month ago #17091 by jpb
Replied by jpb on topic Locate String in Array
I would use
FIND "A" IN ARR SETTING Fpos, Vpos, Apos THEN
...

Please Log in or Create an account to join the conversation.

  • yorn_panha
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #17100 by yorn_panha
Replied by yorn_panha on topic Locate String in Array
thank you. I haven't tried your solution yet. But i found another solution for this issue. I still use locate, but I store the data to another dynamic array, and it works really well.

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds