If both aiRows and aiColumns are UInt16, the result will be UInt16.
It is necessary to typecast your statement if larger type is expected, like:

UInt32 qqq;
qqq = (UInt32) aiRows*aiColumns*4;

In fact, it give type to first argument only but the result will be UInt32
finally.
It is also a problem I experienced before.

"wax wacky" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED]
???...
>
> I am confused by the behaviour of my code warrior ..... my problem is
>
> in my program i have an assignment
>
> UInt32 qqq;
> qqq = (aiRows * aiColumns * 4); ///aiRows = 160, aiCloumns = 140 ;
>
> Now the problem : after execution qqq gets a value of 24064 (binary : 0101
1110 0000 0000 ) instead of 89600 (binary: 1 0101 1110 0000 0000)
>
> That means the operation (aiRows * aiColumns * 4) is giving only a 16 bit
value.
>
> PLEASE tell me is there a problem with my tool?.... is there some setting
which i have to set before using CW.
>
> PLEASE help me to find out the reason for such unusual behaviour....
> thanks
>
> wax
> -- 
> ______________________________________________
> IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for mail
storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
> Powered by Outblaze
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to