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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Limit function using strings as input

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
JulesOZ Posted - 04/01/2013 : 9:38:38 PM
Origin Ver. and Service Release (Select Help-->About Origin): 9
Operating System: Win7

Dear all,
I have a very basic question:
I'd like to use the Limit function to get the maximum value of a certain column. Because I'm looping through a bunch of worksheets and workbooks I have the names of the stored in strings and alternatively I have the worksheet index. The name of the column, where I search for the maximum is always the same.
Can somebody tell me what the syntax is to get the Limit function working? I tried stuff like:

limit %([Bname$]!wks.col$(kk).backgr);

or limit %[Bname$]sIndex$_backgr;

or limit %[Bname$]$(kk)_backgr;

and a lot of other combinations.
But as I always get "Command error" messages, I guess I'm very much on the wrong track.
2   L A T E S T    R E P L I E S    (Newest First)
JulesOZ Posted - 04/02/2013 : 7:27:25 PM
Thanks a lot. That works very well!
I often stumble over syntax stuff like this and so far I found it difficult to find the helpful bits in the programming help. Can you maybe recommend a good overview about this?
greg Posted - 04/02/2013 : 11:24:17 AM
Range syntax:
[<Book Long or Short Name>]<Sheet name or index>!<column name or index>
is (almost) exclusively used for defining ranges and cannot be used for direct addressing.


% notation also expects some valid substitution and none of your examples are valid.

Here is an example that loops over three sheets (using sheet index) in a workbook:

string BkName$ = Book9;
loop(ii,1,3)
{
range ra = [BkName$]$(ii)!backgr;
limit ra;
limit.ymin=;
limit.ymax=;
}

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000