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
 TrimLeft question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 07/07/2021 :  05:22:20 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021b (64-bit) SR2 9.8.5.212
Windows 10 21H1 x64

Greetings!

Why does the following command not work?
wks.col$(j).unit.TrimLeft("(");

Thank you.

---
Andrey

Edited by - AKazak on 07/07/2021 05:22:33 AM

Chris D

428 Posts

Posted - 07/07/2021 :  09:04:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try this. It's not a one-liner, but it'll have to do:

int j = 2;
string s$ = wcol(j)[U]$;
s.TrimLeft("(");
wcol(j)[U]$ = s$;


Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/07/2021 :  09:27:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Chris D

Try this. It's not a one-liner, but it'll have to do:

int j = 2;
string s$ = wcol(j)[U]$;
s.TrimLeft("(");
wcol(j)[U]$ = s$;


Thanks,
Chris Drozdowski
Originlab Technical Support




Dear Chris,

It works as expected.

Why Origin doesn't allow the use of one-liners?
Is this related to the LT interpreter?

---
Andrey
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