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
 Using $,% notation

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
blt2si Posted - 04/07/2003 : 09:36:50 AM
Hello,

I am having trouble with using notations. I have datasets in a worksheet named ss1, ss2, ss3......ss8. And a display column showing the worksheet names. (Column name is "Filename"). If I put in the individual values ss1 the program works but why won't it work with "$(ii)$" which is shown below. Surely the program understands it!

loop (ii,1,8)
{
%T=Interface!Filename.V$(ii)$; //takes the wks names from columns
%A=Mapping; //Wks for graph contours
copy -x %T_ZW %A_SS"$(ii)$"; //ZW is dataset from %T
//SS1,2,3....8 is datasets from %A
copy -a %A_SS"$(ii)$" %A_SSall; //Copy all SS datasets into 1.
};

Is there something I am doing wrong??

Thanks

Blank
5   L A T E S T    R E P L I E S    (Newest First)
blt2si Posted - 04/14/2003 : 08:47:17 AM
Thanks for that Mike and St-Ranger. It works better with the intermediate string!
St-Ranger Posted - 04/09/2003 : 8:13:28 PM
I didn't have time to check this, but it might be somewhat similar to what I described in my problem under the topic "Substition doesn't work in objects/methods.".
See marko's response to it.
Mike Buess Posted - 04/08/2003 : 07:45:47 AM
Hi again,

I use that type of notation all the time and can think of no reason why it should fail. However, here are two things you could try...

1. The quotation marks are really unnecessary in this case, so try omitting them...
loop (ii,1,8)
{
%T=Interface!Filename.V$(ii)$;
copy -x %T_ZW %A_SS$(ii);
copy -a %A_SS$(ii) %A_ZWalle;
};

2. Use an intermediate string variable...
loop (ii,1,8)
{
%T=Interface!Filename.V$(ii)$;
%I=SS$(ii);
copy -x %T_ZW %A_%I;
copy -a %A_%I %A_ZWalle;
};

Mike Buess
Origin WebRing Member
blt2si Posted - 04/08/2003 : 03:42:32 AM
Hello,

I tried this but still it does not work. I put in:

loop (ii,1,8)
{
%T=Interface!Filename.V$(ii)$;
copy -x %T_ZW %A_SS"$(ii)";
copy -a %A_SS"$(ii)" %A_ZWalle;
};

However, to check I simply replaced the "$(ii)" with 1 as follows:

loop (ii,1,8)
{
%T=Interface!Filename.V$(ii)$;
copy -x %T_ZW %A_SS1;
copy -a %A_SS1 %A_ZWalle;
};

%T is understood. It is not recognising the dataset SS"$(ii)" as SS1, SS2,.....,SS8.

I am stumped with this!

Thanx
Mike Buess Posted - 04/07/2003 : 10:30:03 AM
Hi Blank,

The '$' symbol is required at the end of this statement...

%T=Interface!Filename.V$(ii)$; // correct as you wrote it

but it does not belong in your copy statements, which should read...

copy -x %T_ZW %A_SS"$(ii)";
-and-
copy -a %A_SS"$(ii)" %A_SSall;

I hope that helps.

Mike Buess
Origin WebRing Member

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