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
 Failed to initialize range from 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

ds755

57 Posts

Posted - 05/22/2020 :  10:21:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2020 (64-bit) SR1
Operating System: Windows 8.1

Hello,

Does anyone know why the two lines of code below behave differently?

Idmax = max([%H]1!col(H)); // Error
Idmax = max(col(H)); // Works

It should be the same. The top line is treated as a string.

nick_n

Finland
125 Posts

Posted - 05/22/2020 :  10:37:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Try:
max([%H]1!H)=;

Nikolay
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 05/22/2020 :  10:49:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The notation to access any book sheet is supported for column formula and cell formula only.

To use such in a LT script, you need to define a range variable:

range aa=[%H]1!col(H);i=max(aa);i=;


Formula runs some newer code, but we did not improve the general LT interpreter for such.

CP
Go to Top of Page

ds755

57 Posts

Posted - 05/23/2020 :  06:11:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I understand.

Nikolay's suggestion works.
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