H
Hamish M
Hi I am interested in opinions on this topic.
I have heard that a suffix is not a good solution and type casts are
much better
for example.
-----------------------------------------------------------------
#define MAX_UWORD (T_UWORD)65535
or
#define MAX_UWORD 65535u
-------------------------------------------------------------------
Where UWORD is unsigned short int.
What is your opinion? or why would someone have said using a suffix is
no good?
For starters I can see that using the suffix would convert to MAX to
unsigned int and not unsigned short.
Thanks
I have heard that a suffix is not a good solution and type casts are
much better
for example.
-----------------------------------------------------------------
#define MAX_UWORD (T_UWORD)65535
or
#define MAX_UWORD 65535u
-------------------------------------------------------------------
Where UWORD is unsigned short int.
What is your opinion? or why would someone have said using a suffix is
no good?
For starters I can see that using the suffix would convert to MAX to
unsigned int and not unsigned short.
Thanks