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
 Can I use temporary dataset values in getn?

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
Katti Posted - 10/17/2018 : 05:55:19 AM
Hi all,

I'd like to use a dataset in a getn subroutine, but getn doesn't seem to be able to take dataset values.

What I'm trying is something like this:

dataset values;
values.setsize(3);
getn (Value 1) values[1] (Value 2) values[2] (Value 3) values[3];

Creating individual variables for the getn dialogue is possible but confounded by my need to be able to handle a variable number of dataset values. The subroutine to handle the number of dataset values is ok - it's just the getn function that's causing a headache. I have a workaround with a variable number of variables but it's cumbersome. Any help would be greatly appreciated.
2   L A T E S T    R E P L I E S    (Newest First)
Katti Posted - 10/18/2018 : 08:48:15 AM
quote:
Originally posted by Hideo Fujii

str$="(Value 1) rr1 (Value 2) rr2 (Value 3) rr3";
getn %(str$);
ii=2;
rr$(ii)=;
You can construct str$



Hi Hideo, this is pretty much what I'm doing at the moment :-)
Hideo Fujii Posted - 10/17/2018 : 1:14:15 PM
Hi Katti,

Though this is not a direct answer to your question, you may want to try like following:
str$="(Value 1) rr1 (Value 2) rr2 (Value 3) rr3";
getn %(str$);
ii=2;
rr$(ii)=;
You can construct str$ by string manipulation depending on the desired number of variables.

Hope this helps.

--Hideo Fujii
OriginLab

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