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
 Issue col(4) vs. [bk$](1)!col(4)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter311

Germany
4 Posts

Posted - 07/28/2009 :  08:45:29 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic

Hi there,
I've got a problem with the right adressing of multiple cols.

I can use the command in the command window
col(d) = -ln(col(c)) and everything works fine.

But if I use [bk$]$(1)!col(d)=-ln([bk$]$(1)!col(c)) I'll get an error: Math can not be used with text columns (my free translation from German).
Do you have a clue, what I'm doing wrong? I've used the e.g. [bk$]$(ii)!cell(rownr,4) for other stuff and everything was right. bk is here bk$=%H.

Thanks in advance!
Peter


Origin Ver. and Service Release: 8G SR4
Operating System: Windows XP SP3

greg

USA
1379 Posts

Posted - 07/28/2009 :  4:00:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Range notation is used exclusively to define range variables. It cannot be used as a general notation for data access on either side of an expression.

string bk$ = %H;
range rc = [bk$]1!col(c);
range rd = [bk$]1!col(d);
rd = -ln(rc);

Note that $(1) is redundant. You only need the 1.
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