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
 question concerning substitution notation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kfauth

Germany
33 Posts

Posted - 06/28/2016 :  07:29:34 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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?

Hideo Fujii

USA
1582 Posts

Posted - 06/30/2016 :  1:44:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

kfauth

Germany
33 Posts

Posted - 07/01/2016 :  03:49:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Of course it does! How blind can you (well me...) be...

Thanks & sorry for bothering you with this

Edited by - kfauth on 07/01/2016 03:50:07 AM
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