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
 Set column values with Labtalk

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
cougar2 Posted - 10/05/2004 : 03:57:46 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System: Win2000

I have a worksheet called "Winkel" and need to set the values for a number of columns.
Here is part of my Labtalk-script. All columns exist.

gradschritt=20;
zahlgrad=360/$(gradschritt);
qq=($(zahlgrad)*2)+3;
tt=0;
for (ii=2;ii<=$(qq);ii=ii+2){
Winkel!wks.col$(ii).label$=x(cos) $(tt)°; // Label columns
Winkel!wks.col$(ii)=col(a)*cos($(tt)); // This doesnŽt work! (1)
tt=$(tt)+$(gradschritt);
};


In line (1) I would like to do the labtalk equivalent of "set column values", which is, calculate the values for the ii-th column by doing some math with cosine and column(a).
I also tried the method
Winkel_wks.col$(ii)=col(a)*cos(20);
but it doesnŽt work either.
Just using col(b) = col(a)*cos(20) works fine but IŽd like to do it in the for-loop.

2   L A T E S T    R E P L I E S    (Newest First)
cougar2 Posted - 10/05/2004 : 08:38:17 AM
Thanks a lot!

Mike Buess Posted - 10/05/2004 : 07:58:04 AM
You can't use wks.col to assign column values so neither of the methods you tried should work. This will...

%A=Winkel!wks.col$(ii).name$;
Winkel_%A=col(a)*cos(20);

Also, you're using the $() notation unnecessarily. It's only needed to express number as string.

gradschritt=20;
zahlgrad=360/gradschritt;
qq=(zahlgrad*2)+3;
tt=0;
for (ii=2;ii<=qq;ii=ii+2) {
Winkel!wks.col$(ii).label$=x(cos) $(tt)°; // Label columns
%A=Winkel!wks.col$(ii).name$;
Winkel_%A=col(a)*cos(tt);
tt=tt+gradschritt;
};

Mike Buess
Origin WebRing Member

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