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
Bitwise operator in OriginC
New Topic
Reply to Topic
Printer Friendly
Author
Topic
cosy
Germany
Posts
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
cpyang
USA
1407 Posts
Posted - 03/26/2004 : 07:56:09 AM
Can you post code? should not have problem, maybe data type double/float?
CP
cosy
Germany
Posts
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
USA
1407 Posts
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
Topic
New Topic
Reply to Topic
Printer Friendly
Jump To:
Select Forum
Origin Forum
Origin Forum
Origin Viewer Forum
Origin Learning Edition Forum
Origin Forum for Programming
Forum for Python
Forum for Origin C
Forum for Automation Server/COM and LabVIEW
LabTalk Forum
Origin中文论坛
Origin 中文论坛 (Chinese Origin Forum)
Japanese Origin Forum
Origin日本語フォーラム (Japanese Origin Forum)
Origin on Linux
The Origin on Linux Forum
Private Forums
Distributor Forum
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000