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
 question concerning substitution 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
kfauth Posted - 06/28/2016 : 07:29:34 AM
Origin Ver. and Service Release (Select Help-->About Origin): Pro2015 G Sr2
Operating System: Win7Pro

Hello all,

I happen to have worksheet and column names that depend on numerical parameters. These parameters are stored in the variables
siffg,  siffe,  sidfe

If I define string variables for the window and column names:
ww$="ISOffG$(siffg)";
nc$="G$(siffg)E$(siffe)d$(sidfe)";

then the following code fails in the last line (command error)
win -a %(ww$);
work -v %(nc$);
%(ww)_%(nc$) = (2*BookX_B+BookZ_B)/3;

while the following works:
win -a %(ww$);
work -v %(nc$);
ISOffG$(siffg)_%(nc$) = (2*BookX_B+BookZ_B)/3;

In my opinion, both should be doing the same.

Does someone know the reason for the different behavior?
2   L A T E S T    R E P L I E S    (Newest First)
kfauth Posted - 07/01/2016 : 03:49:31 AM
Of course it does! How blind can you (well me...) be...

Thanks & sorry for bothering you with this
Hideo Fujii Posted - 06/30/2016 : 1:44:01 PM
Hi kfauth,

Seems the following line lacks "$" for ww:
%(ww)_%(nc$) = (2*BookX_B+BookZ_B)/3;
That is, it should be:
%(ww$)_%(nc$) = (2*BookX_B+BookZ_B)/3;


Works?

--Hideo Fujii
OriginLab

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