Author |
Topic |
|
cosy
Germany
Posts |
Posted - 08/03/2004 : 07:57:18 AM
|
Hi, Just have a look at this OriginC code Dataset dsA("Trictestdata_A"); Dataset dsB("Trictestdata_G"); int ii; UINT data; UINT datac; int aa = dsA.GetUpperBound(); for(ii=0;ii<aa+1;ii++) { data = dsB[ii]; dsB[ii] = (data & 0xFFFFFF); datac = dsA[ii]; dsA[ii] = datac; } The last two lines of the code should leave the dataset as it is. I found that its being replaced by another number. Can anyone give some explanation?
Regards, Deepak Samuel.
|
|
easwar
USA
1964 Posts |
Posted - 08/03/2004 : 11:10:00 AM
|
Hi Deepak,
By default, Origin worksheet column type is set as Text and Numeric, where the type of numbers supported is double. If you change the column format (double-click to bring up dialog), from Text and Numeric to just Numeric, you can then set the internal data setting for the column to be double(8), Float(4), Integer(2), or Long(4). But still for settings such as Integer(2) only signed integers are supported - there is currently no support for unsigned int.
In your code, you are taking the column value and first assigning it to a variable declared as UINT - which can right there change the value of the data depending on what the original value was - and then you are assigning it back to the column - which is why you are ending up with a different value than what you started from.
Easwar OriginLab
Edited by - easwar on 08/03/2004 11:10:54 AM |
|
|
|
Topic |
|
|
|