Assigning large values to long long

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
lilltroll
XCore Expert
Posts: 955
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Assigning large values to long long

Postby lilltroll » Thu Feb 11, 2010 12:15 am

How do you assign large values to a long long int ?

For an example, the compiler will generate a warning for this row.

Code: Select all

long long B[]={12057589302758758,0,-1};
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Postby leon_heller » Thu Feb 11, 2010 12:42 am

L is long, perhaps it's LL, like 1234...555LL. I just tried it and it worked! The compiler didn't complain about it, at any rate.

Leon
User avatar
lilltroll
XCore Expert
Posts: 955
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Postby lilltroll » Thu Feb 11, 2010 8:53 pm

Thanks - I have some problem with my quad-floats in MATLAB right now so I will go back to something more simple with the long long again in C.
Extended MAC: int64 * int24 + int?? => int??
Probably not the most confused programmer anymore on the XCORE forum.

Who is online

Users browsing this forum: No registered users and 0 guests