Locate String in Array
- yorn_panha
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
9 years 8 months ago - 9 years 8 months 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"
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 8 months ago by yorn_panha.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
Less
More
- Posts: 2859
- Thank you received: 649
9 years 8 months 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
...
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
Less
More
- Posts: 6
- Thank you received: 0
9 years 8 months 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.065 seconds