The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 String commands in tree variable

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
JokerOne Posted - 02/17/2016 : 08:45:52 AM
Origin Ver. 9 and Service Release 1(Select Help-->About Origin):
Operating System: Win 7

I am keen on using tree variables in my LabTalk code.
Currently, I noticed, that the String-commands cannot be used as I believed they could be used for string-variables within a tree structure.

For example:
tree aaa
>>aaa.str1$ = Albert Einstein
>>bbb$ = aaa.str1$
>>i1 = aaa.str1.Find("Eins")
>>i2 = bbb.Find("Eins")
>>i1 =
results: --
>>i2 =
results: 8

Is there a way, to avoid the workaround to handover the tree-string variable to a dummy-variable prior to such string commands?

Thanks for your help.

P.S.: I tried such things as
(aaa.str).Find... or
(aaa.str)$.Find...
but was not successful, yet.

2   L A T E S T    R E P L I E S    (Newest First)
JokerOne Posted - 02/18/2016 : 02:47:11 AM
Yes, pretty.

Thank you!
Hideo Fujii Posted - 02/17/2016 : 10:13:57 AM
Hi JokerOne,

The following should work. Please look at the following code:
tree aaa;
aaa.str1$ = "Albert Einstein";
find(aaa.str1$,"Ein")=;
find(aaa.str1$,"Ein")=8
--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000