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
 Bitwise operator in OriginC

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
cosy Posted - 03/26/2004 : 04:38:06 AM
Hi,
Are bitiwse operations possible OriginC?
Should I include a header file for it?
I encountered compilation errors when using & and |.Does OriginC use a different syntax for them?
Thanks
3   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 03/26/2004 : 09:11:48 AM
what are you trying to do here?

ds2 is a Dataset, which is a vector, so I don't see how that can work. If you are trying to get the 1st element to test for a bit, then maybe

int nn = ds2[0];
if((nn & 1024) == 1024)
{
ds3 = ds1;
}

CP


cosy Posted - 03/26/2004 : 08:24:40 AM
Hi, whenever I use a bit wise operator in Origin C I get a compiler error : incompatible variable type.
The following is a piece of my code

Dataset ds1("MyData_a");
Dataset ds2("MyData_b");
Dataset ds3("MyData_c");
Dataset ds4("MyData_d");
if(ds2 & 1024 == 1024)
{
ds3 = ds1;
}

I get an error at the if statement (Incompatible variable type)
Can any explain the cause of it?
Thanks.
Deepak Samuel
cpyang Posted - 03/26/2004 : 07:56:09 AM
Can you post code? should not have problem, maybe data type double/float?

CP



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