#define today april_1st
I like the way the C language has been evolving: as machine word
will be getting bigger and bigger, someday our descendens would
be using long long long long type to work 128 bit integers. The
road is bright, straight and infinite!
Apparently, MS has chosen a different, and more effective mean to
extend data types, namely double underscore prefix and bit count
suffix, so their extended 64 bit type is __ then int then 64.
It is clear that a 128 bit integer type is an extension of the
extended type and it would be denoted as ____int128.
I hope my demise would happen before this "brave new world" :)
Andrew
P.S. One more obsevation: as the order of keywords does matter,
e.g. int unsigned is invalid, you can type long long, but cannot
long long. Prove me wrong! :)))
Also, keeping in mind that long is a shorthand for signed long int,
try to imagine what unsigned long long might mean :)
> Date: Wed, 1 Mar 2006 07:12:56 -0800
> From: "Gregory Lee" <tatsuling@tats...>
> Subject: Re: How to convert __int64 (MSVC) to TI's syntax???
>
> From the combined C99 + TC1 + TC2 standard at
> http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf the long
> long types maximum value constant, ULLONG_MAX, is defined to be 2 ^ 64
> - 1 which implies that the type must hold at least 64 bits of
> information.
>
> Also, I happen to use the unsigned long long type for a time value
> from an NTP server which uses a 64-bit number to represent time and it
> works fine on a DM642 with CCS 3.1.
>
> Gregory Lee
>
> On 3/1/06, Bhooshan Iyer <bhooshaniyer@bhoo...> wrote:
>>
>> JS--
>> My understanding is that:
>> 40- bit long is NOT consisten with any other compiler, let alone being
>> ANSI-C compliant; In fact I dont think ANSI is in the habbit of
defining
>> data type size beyond 32 bit. Am I wrong here?
>>
>> --Bhooshan
>>
>>
>>
>>
>> On 3/1/06, sankaran <sankaran@sank...> wrote:
>>> The correct data type is as follows:
>>>
>>> 64 bit integers; long long and unsigned long long
>>>
>>> 64 bit floating point; double.
>>>
>>> 40-bit: long
>>>
>>> This is consistent with Ansi-C.
>>>
>>> Regds
>>> JS
>>>
>>> -----Original Message-----
>>> From: c6x@c6x@... [mailto: c6x@c6x@...] On Behalf Of venu
>>> Sent: Tuesday, February 28, 2006 7:29 AM
>>> To: mvgkbhat; Nguyen Pham Anh Khoa
>>> Cc: c6x@c6x@...
>>> Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's
syntax???
>>>
>>> hi,
>>> as far as i remember, long will take 40 bit in C6x.
>>> so, i doubt long long will be equivalent to 64bit.
>>> instead double should serve the purpose.
>>> please correct me guys if i understood wrongly.
>>> regards,
>>> venu
>>>
>>> --- mvgkbhat <mvgkbhat@mvgk...> wrote:
>>>
>>>> Equivalent of __int64 is long long in C6x.
>>>>
>>>> Regards,
>>>> Venu.
>>>>
>>>>
>>>> On 2/25/06, Nguyen Pham Anh Khoa < npak243@npak...>
wrote:
>>>>>
>>>>> Hi everybody,
>>>>>
>>>>> I'm Khoa. I'm working with C6713 board and Code
Composer
>>>> Studio V3.1.
>>>>>
>>>>> I'd like to know how TI defines a 64bit integer ?
(like
>>>> __int64 in
>>>>> Microsoft Visual C)?
>>>>> I hope that you can help me to solve that problem.
>>>>>
>>>>> Thanks ,
>>>>>
>>>>> Anh Khoa
>>>>>
Reply by ●March 1, 20062006-03-01
The standard defines the MINIMUM sizes for types. A C compiler
implementation is free to make a type larger than specified in the standard
(and therefore have different values than the defaults for the xxx_MAX
constants).
Quote from the document referenced below regarding xxx_MAX constants.
"Their
implementation-defined values shall be equal or greater in magnitude
(absolute value) to those shown, with the same sign."
Therefore the minimum size of an unsigned long long as defined by the
standard is 64 bits. It could be larger depending on implementation. On C6x
it is 64bits.
Mike
-----Original Message-----
From: c6x@c6x@... [mailto:c6x@c6x@...] On Behalf Of Gregory
Lee
Sent: Wednesday, March 01, 2006 7:13 AM
To: c6x@c6x@...
Cc: Nguyen Pham Anh Khoa
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???
>From the combined C99 + TC1 + TC2 standard at
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf the long
long types maximum value constant, ULLONG_MAX, is defined to be 2 ^ 64
- 1 which implies that the type must hold at least 64 bits of
information.
Also, I happen to use the unsigned long long type for a time value
from an NTP server which uses a 64-bit number to represent time and it
works fine on a DM642 with CCS 3.1.
Gregory Lee
On 3/1/06, Bhooshan Iyer <bhooshaniyer@bhoo...>
wrote:
>
> JS--
> My understanding is that:
> 40- bit long is NOT consisten with any other compiler, let alone being
> ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining
> data type size beyond 32 bit. Am I wrong here?
>
> --Bhooshan
>
>
>
>
> On 3/1/06, sankaran <sankaran@sank...> wrote:
> > The correct data type is as follows:
> >
> > 64 bit integers; long long and unsigned long long
> >
> > 64 bit floating point; double.
> >
> > 40-bit: long
> >
> > This is consistent with Ansi-C.
> >
> > Regds
> > JS
> >
> > -----Original Message-----
> > From: c6x@c6x@... [mailto: c6x@c6x@...] On Behalf Of
venu
> > Sent: Tuesday, February 28, 2006 7:29 AM
> > To: mvgkbhat; Nguyen Pham Anh Khoa
> > Cc: c6x@c6x@...
> > Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's
syntax???
> >
> > hi,
> > as far as i remember, long will take 40 bit in C6x.
> > so, i doubt long long will be equivalent to 64bit.
> > instead double should serve the purpose.
> > please correct me guys if i understood wrongly.
> > regards,
> > venu
> >
> > --- mvgkbhat <mvgkbhat@mvgk...> wrote:
> >
> > > Equivalent of __int64 is long long in C6x.
> > >
> > > Regards,
> > > Venu.
> > >
> > >
> > > On 2/25/06, Nguyen Pham Anh Khoa < npak243@npak...> wrote:
> > > >
> > > > Hi everybody,
> > > >
> > > > I'm Khoa. I'm working with C6713 board and Code
Composer
> > > Studio V3.1.
> > > >
> > > > I'd like to know how TI defines a 64bit integer ? (like
> > > __int64 in
> > > > Microsoft Visual C)?
> > > > I hope that you can help me to solve that problem.
> > > >
> > > > Thanks ,
> > > >
> > > > Anh Khoa
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> --
> -------------------------------
> "I've missed more than 9000 shots in my career.
> I've lost almost 300 games. 26 times I've been trusted to take
the game
> winning shot and missed.
> I've failed over and over again in my life.
> And that is why I succeed."
> -- Michael Jordan
> --------------------------------
>
>
>
>
>
>
>
> ________________________________
>
--
Gregory Lee
Reply by Bhooshan Iyer●March 1, 20062006-03-01
OK. Thanks for clarifying. I have never read the standard thoroughly.
--Bhooshan
On 3/1/06, sankaran <s...@ti.com> wrote:
I was not trying to say that ANSI-C says that long
shall be 40-bits. All ANSI-C says is that the width of the data type long,
shall be greater than or equal to int, and from that
perspective the 40-bit long is larger than 32-bit int, so it is consistent with
ANSI-C.
Regds
JS
From: Bhooshan Iyer
[mailto:
b...@gmail.com] Sent:
Wednesday, March 01, 2006 5:18 AM
To: sankaran Cc: b...@yahoo.com
; mvgkbhat; Nguyen Pham Anh Khoa; c...@yahoogroups.com
Subject: Re: [c6x] How to
convert __int64 (MSVC) to TI's syntax???
JS--
My
understanding is that:
40- bit
long is NOT consisten with any other compiler, let alone being ANSI-C
compliant; In fact I dont think ANSI is in the habbit of defining data type size
beyond 32 bit. Am I wrong here?
--Bhooshan
On
3/1/06, sankaran <
s...@ti.com> wrote:
The
correct data type is as follows:
64 bit integers; long long and
unsigned long long
64 bit floating point; double.
40-bit:
long
This is consistent with Ansi-C.
Regds JS
-----Original Message----- From:
c...@yahoogroups.com [mailto: c...@yahoogroups.com] On Behalf Of venu Sent:
Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa Cc: c...@yahoogroups.com Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???
hi, as far as i remember, long will take 40 bit in C6x. so, i
doubt long long will be equivalent to 64bit. instead double should serve
the purpose. please correct me guys if i understood wrongly. regards,
venu
--- mvgkbhat <m...@gmail.com> wrote:
>
Equivalent of __int64 is long long in C6x.
> > Regards, > Venu.> On 2/25/06, Nguyen Pham Anh
Khoa < n...@yahoo.com
> wrote: > > > > Hi everybody, > > >
> I'm Khoa. I'm working with C6713 board and Code Composer > Studio V3.1. > > > > I'd like to know how TI
defines a 64bit integer ? (like
> __int64 in > > Microsoft Visual C)? > > I hope
that you can help me to solve that problem. > > > > Thanks
, > > > > Anh Khoa >
__________________________________________________ /" target="_blank
-- ------------------------------- "I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take
the game winning shot and missed. I've failed over and over again in
my life. And that is why I succeed." -- Michael Jordan --------------------------------
-- ------------------------------- "I've
missed more than 9000 shots in my career. I've lost almost 300 games.
26 times I've been trusted to take the game winning shot and missed.
I've failed over and over again in my life. And that is why I
succeed." -- Michael
Jordan --------------------------------
Reply by sankaran●March 1, 20062006-03-01
I was not trying to say that ANSI-C says
that long shall be 40-bits. All ANSI-C says is that the width of the data type
long,
shall be greater than or equal to int, and
from that perspective the 40-bit long is larger than 32-bit int, so it is
consistent with ANSI-C.
Regds
JS
From:
Bhooshan Iyer
[mailto:b...@gmail.com] Sent: Wednesday, March 01, 2006
5:18 AM To: sankaran Cc: b...@yahoo.com;
mvgkbhat; Nguyen Pham Anh Khoa; c...@yahoogroups.com Subject: Re: [c6x] How to convert
__int64 (MSVC) to TI's syntax???
JS--
My understanding is that:
40- bit long is NOT consisten with any other compiler, let alone
being ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining
data type size beyond 32 bit. Am I wrong here?
--Bhooshan
On 3/1/06, sankaran
<s...@ti.com> wrote:
The correct data type is
as follows:
64 bit integers; long long and unsigned long long
64 bit floating point; double.
40-bit: long
This is consistent with Ansi-C.
Regds
JS
-----Original Message-----
From: c...@yahoogroups.com [mailto: c...@yahoogroups.com] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???
hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu
--- mvgkbhat <m...@gmail.com>
wrote:
> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu.
> On 2/25/06, Nguyen Pham Anh Khoa < n...@yahoo.com>
wrote: > >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
>
>
--
-------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the
game winning
shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
-- Michael Jordan
--------------------------------
Reply by Gregory Lee●March 1, 20062006-03-01
From the combined C99 + TC1 + TC2 standard at
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf the long
long types maximum value constant, ULLONG_MAX, is defined to be 2 ^ 64
- 1 which implies that the type must hold at least 64 bits of
information.
Also, I happen to use the unsigned long long type for a time value
from an NTP server which uses a 64-bit number to represent time and it
works fine on a DM642 with CCS 3.1.
Gregory Lee
On 3/1/06, Bhooshan Iyer <bhooshaniyer@bhoo...>
wrote:
>
> JS--
> My understanding is that:
> 40- bit long is NOT consisten with any other compiler, let alone being
> ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining
> data type size beyond 32 bit. Am I wrong here?
>
> --Bhooshan
>
>
>
>
> On 3/1/06, sankaran <sankaran@sank...> wrote:
> > The correct data type is as follows:
> >
> > 64 bit integers; long long and unsigned long long
> >
> > 64 bit floating point; double.
> >
> > 40-bit: long
> >
> > This is consistent with Ansi-C.
> >
> > Regds
> > JS
> >
> > -----Original Message-----
> > From: c6x@c6x@... [mailto: c6x@c6x@...] On Behalf Of venu
> > Sent: Tuesday, February 28, 2006 7:29 AM
> > To: mvgkbhat; Nguyen Pham Anh Khoa
> > Cc: c6x@c6x@...
> > Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's
syntax???
> >
> > hi,
> > as far as i remember, long will take 40 bit in C6x.
> > so, i doubt long long will be equivalent to 64bit.
> > instead double should serve the purpose.
> > please correct me guys if i understood wrongly.
> > regards,
> > venu
> >
> > --- mvgkbhat <mvgkbhat@mvgk...> wrote:
> >
> > > Equivalent of __int64 is long long in C6x.
> > >
> > > Regards,
> > > Venu.
> > >
> > >
> > > On 2/25/06, Nguyen Pham Anh Khoa < npak243@npak...> wrote:
> > > >
> > > > Hi everybody,
> > > >
> > > > I'm Khoa. I'm working with C6713 board and Code
Composer
> > > Studio V3.1.
> > > >
> > > > I'd like to know how TI defines a 64bit integer ? (like
> > > __int64 in
> > > > Microsoft Visual C)?
> > > > I hope that you can help me to solve that problem.
> > > >
> > > > Thanks ,
> > > >
> > > > Anh Khoa
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> --
> -------------------------------
> "I've missed more than 9000 shots in my career.
> I've lost almost 300 games. 26 times I've been trusted to take
the game
> winning shot and missed.
> I've failed over and over again in my life.
> And that is why I succeed."
> -- Michael Jordan
> --------------------------------
>
>
>
>
>
>
>
> ________________________________
>
--
Gregory Lee
Reply by Anand Pradhan●March 1, 20062006-03-01
Hi All,
I just want to give explanation on
this issue :
Please refer " spru198g.pdf " section 2.2 on
data types , its as follows -
TheC6000 compiler
defines a size for each data type (signed and unsigned):
*
char 8 bits
* short 16 bits
* int 32 bits
* long 40 bits
*float 32 bits
* double 64 bits
ANSI C defines 64 bits as " __int64 "
and there you don't have any data type corresponds to 40
bits.
-----Original Message----- From: c...@yahoogroups.com
[mailto:c...@yahoogroups.com]On Behalf Of Bhooshan Iyer Sent:
Wednesday, March 01, 2006 4:48 PM To: sankaran Cc:
b...@yahoo.com; mvgkbhat; Nguyen Pham Anh Khoa; c...@yahoogroups.com Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's
syntax???
JS--
My understanding is that:
40- bit long is NOT consisten with any other compiler, let alone being
ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining data
type size beyond 32 bit. Am I wrong here?
--Bhooshan
On 3/1/06, sankaran <s...@ti.com> wrote:
The correct
data type is as follows:
64 bit integers; long long and unsigned long
long
64 bit floating point; double.
40-bit: long
This is consistent with Ansi-C.
Regds JS
-----Original Message----- From: c...@yahoogroups.com [mailto:
c...@yahoogroups.com] On Behalf Of venu Sent: Tuesday, February 28, 2006
7:29 AM To: mvgkbhat; Nguyen Pham Anh Khoa Cc: c...@yahoogroups.com Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???
hi, as far as i remember, long will take 40 bit in C6x. so, i
doubt long long will be equivalent to 64bit. instead double should serve
the purpose. please correct me guys if i understood wrongly. regards,
venu
--- mvgkbhat <m...@gmail.com> wrote:
>
Equivalent of __int64 is long long in C6x. > > Regards, > Venu.> On 2/25/06, Nguyen Pham Anh Khoa < n...@yahoo.com>
wrote: > > > > Hi everybody, > > > >
I'm Khoa. I'm working with C6713 board and Code Composer >
Studio V3.1. > > > > I'd like to know how TI defines
a 64bit integer ? (like > __int64 in > > Microsoft Visual
C)? > > I hope that you can help me to solve that problem. >
> > > Thanks , > > > > Anh Khoa >
__________________________________________________
-- ------------------------------- "I've missed more than 9000 shots
in my career. I've lost almost 300 games. 26 times I've been
trusted to take the game winning shot and missed. I've failed over and
over again in my life. And that is why I succeed." -- Michael Jordan --------------------------------
Reply by Bhooshan Iyer●March 1, 20062006-03-01
JS--
My understanding is that:
40- bit long is NOT consisten with any other compiler, let alone being
ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining data
type size beyond 32 bit. Am I wrong here?
--Bhooshan
On 3/1/06, sankaran <s...@ti.com> wrote:
The correct
data type is as follows:
64 bit integers; long long and unsigned long
long
64 bit floating point; double.
40-bit: long
This is consistent with Ansi-C.
Regds JS
-----Original Message----- From:
c...@yahoogroups.com [mailto:
c...@yahoogroups.com] On Behalf Of venu Sent: Tuesday, February 28, 2006
7:29 AM To: mvgkbhat; Nguyen Pham Anh Khoa Cc: c...@yahoogroups.com Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???
hi, as far as i remember, long will take 40 bit in C6x. so, i doubt long long will be equivalent to 64bit. instead double should
serve the purpose. please correct me guys if i understood wrongly. regards,
venu
--- mvgkbhat <m...@gmail.com> wrote:
>
Equivalent of __int64 is long long in C6x. > > Regards, > Venu.> On 2/25/06, Nguyen Pham Anh Khoa <
n...@yahoo.com> wrote: > > > > Hi everybody, >
> > > I'm Khoa. I'm working with C6713 board and Code
Composer > Studio V3.1. > >
> > I'd like to know how TI defines a 64bit integer ? (like > __int64 in > > Microsoft Visual C)? > > I hope that
you can help me to solve that problem. > > > > Thanks ,
> > > > Anh Khoa >
__________________________________________________
-- -------------------------------
"I've missed more than 9000 shots in my career. I've
lost almost 300 games. 26 times I've been trusted to take the game winning
shot and missed. I've failed over and over again in my life. And
that is why I succeed."
-- Michael Jordan --------------------------------
Reply by sankaran●February 28, 20062006-02-28
The correct data type is as follows:
64 bit integers; long long and unsigned long long
64 bit floating point; double.
40-bit: long
This is consistent with Ansi-C.
Regds
JS
-----Original Message-----
From: c6x@c6x@... [mailto:c6x@c6x@...] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c6x@c6x@...
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???
hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu
--- mvgkbhat <mvgkbhat@mvgk...> wrote:
> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu.
>
>
> On 2/25/06, Nguyen Pham Anh Khoa <npak243@npak...> wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> >
>
>
>
>
>
>
>
>
>
>
>
>
__________________________________________________
Reply by venu●February 28, 20062006-02-28
hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu
--- mvgkbhat <mvgkbhat@mvgk...> wrote:
> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu.
>
>
> On 2/25/06, Nguyen Pham Anh Khoa <npak243@npak...> wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> >
>
>
>
>
>
>
>
>
>
>
>
>
__________________________________________________
Reply by mvgkbhat●February 28, 20062006-02-28
Equivalent of __int64 is long long in C6x.
Regards,
Venu.
On 2/25/06, Nguyen Pham Anh Khoa <npak243@npak...> wrote:
>
> Hi everybody,
>
> I'm Khoa. I'm working with C6713 board and Code Composer Studio
V3.1.
>
> I'd like to know how TI defines a 64bit integer ? (like __int64 in
> Microsoft Visual C)?
> I hope that you can help me to solve that problem.
>
> Thanks ,
>
> Anh Khoa
>