Re: general array in C
Cyn wrote:
If you are on embedded platform, you probably care about memory usage
and jacob's solution is not optimal (similar to what Perl do). See my
other post.
a+, ld.
Cyn wrote:
"Simon Biber" <news@ralmin.cc wrote in message
news:453f269b_4 @news.peopletel ecom.com.au...
>
>
>
Yes I like jacob's solution and I already made the same choice to not
include 64 bits types (yet)
For all the people recommending other languages, I work on embedded platform
and C is the language we use. It's not like I can go around and say "hey
lets change language because it fits the problem Im solving better"
news:453f269b_4 @news.peopletel ecom.com.au...
>
>>Jacob's solution, to use a union of different types, is a good one. But it
>>would pay to consider what types you actually need to be able to store.
>>The included types long long, double and long double are all at least 64
>>bits and may be even more. The long double on my machine is 96 bits (12
>>bytes), three times the size of a pointer to void or an int. That's
>>tripling the size of the 'array'.
>>would pay to consider what types you actually need to be able to store.
>>The included types long long, double and long double are all at least 64
>>bits and may be even more. The long double on my machine is 96 bits (12
>>bytes), three times the size of a pointer to void or an int. That's
>>tripling the size of the 'array'.
>
Yes I like jacob's solution and I already made the same choice to not
include 64 bits types (yet)
For all the people recommending other languages, I work on embedded platform
and C is the language we use. It's not like I can go around and say "hey
lets change language because it fits the problem Im solving better"
and jacob's solution is not optimal (similar to what Perl do). See my
other post.
a+, ld.
Comment