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
 Help - Bit wise operations in labtalk?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cosy

Germany
Posts

Posted - 03/24/2004 :  08:18:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I have two layers in a graphs and I want a dataset to be displayed in the first or in the second layer depending upon the value of a bit in a dataset.
My code goes like:
(MyData_Data1 is the dataset from which the bit is decoded,
and Mydata_Data2 is the data to be plotted.)
if(MyData_Data1 & 256 == 256)
{
page.active=0;
layer -e MyData_Data2;
page.active=1;
layer -i MyData_Data2;
}
else if(MyData_Data1 & 256 == 512)
{
page.active=1;
layer -e MyData_Data2;
page.active=0;
layer -i MyData_Data2;

}
It doesnt work , whatever the value of the bit,it plots inthe first layer only.

Can any one help me out?
Thanks,
Deepak Samuel.

Mike Buess

USA
3037 Posts

Posted - 03/24/2004 :  4:04:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Layer numbering starts with 1 in LabTalk.

page.active=1 or 2; // not 0 or 1

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/24/2004 4:05:52 PM
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