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
 Forum for Origin C
 cut string
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Campo

Germany
Posts

Posted - 07/05/2006 :  10:42:10 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5S6
Operating System: xp

i wanna cut a string variable. In the help i found a way to do that fast with Substring Notation in labtalk. But i have again the problem to integrate it into my origin c script.
Can somebody help and say what i do wrong?


void test()
{
char szTemp[100];
string str("abcd.efgh");

LT_set_str("%K", str);
LT_execute("%J = %[%K, .]");
LT_get_str("%J", szTemp, 100);

string str2 = szTemp;
printf("blub: %s\n", str2);
printf(str);
}

easwar

USA
1965 Posts

Posted - 07/05/2006 :  10:55:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Campo,

You don't have to call back to LabTalk to do processing of strings in Origin C - there are many methods available in Origin C itself. Look in the Programming Help file under the topic:
Origin C Language Reference->Classes->Composite Data Types->string

Easwar
OriginLab

Go to Top of Page

Campo

Germany
Posts

Posted - 07/05/2006 :  11:59:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thanks!!!
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