| 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
|