Hi,
You can create a struct :
typedef struct VeryBig
{
int msb;
int lsb;
}VeryBig;
But basically you will still have to write a function. Although I don't see
a problem in that:
void AddTwo128BitNumbers(VeryBig first, VeryBig second, VeryBig *result);
Arik
On Wed, Jan 20, 2010 at 16:52, Ruben Rios del Pozo <[email protected]> wrote:
> Hello everyone,
>
> I was wondering which is the best way of creating new data types from
> existing ones. Actually, my intention is to have a new data type
> supporting 128 bits long data. As far as I am concerned, I see there
> is a uint64_t type so I could just make an array of size 2 from this
> data type. However, how can I manage arithmetic operations over this
> data type? Apparently, it seems to me that I should create a function
> to handle all these operations. Therefore, my question is the
> following: is there an easier way of doing this, without the need of
> defining operations for my new data type?
>
> All the best,
> Ruben
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Best Regards,
Arik Sapojnik
[email protected]
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help