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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 anyone familiar with string arrays
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Davek

USA
6 Posts

Posted - 02/24/2014 :  10:16:34 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm reading the text from a graph assigning it to %A and then trying to add %A to string array. THis does not seem to work any suggestions much appreciated. The %A and %B are correctly read just not added toe the array, I sure I'm missing something simple.

Script below

shortname.SetSize(0);// clear array
Labels1.SetSize(0); // Clear array
StringArray Labels1;
StringArray ShortName;
doc-e LW
{
%A=plot.text$;
Labels1.Add(%A);
ShortName.Add(%C);
%A=;
%C=;
}

Thanks
DaveK

lkb0221

China
497 Posts

Posted - 02/24/2014 :  10:43:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I tested your script and didn't see and problem.
Maybe you used the wrong way to read the array?
You need to use "GetAt" method to read a array, for example:

str1$ = shortname.getAt(1)$;
str1$ =;

Zheng
OriginLab
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000