We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Does anybody know, how one have to cast an operation correctly? And is it necessary to tell the compiler that a constant is unsined long
#define dword unsigned long unsigned char ucH; //hours unsigned char ucM; //minutes unsigned char ucS; //seconds dword ulTime; //Time in s GetTime(...); ulTime = ucS + ucM*60 + ucH*3600; [..]
ulTime = (dword)(ucS + ucM*60 + ucH*3600);
ulTime = ucS + (dword)ucM*60 + (dword)ucH*3600);
I will check whether your suggestion will work in all cases or not :-). I hope fervently that C166 will keep to ANSI-C! The C166 compiler is ANSI compliant as tested using the test suites that we have. My suggestion is one of many ways to do things, but it should work with ANY ANSI C compilter. Jon