Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where is __int64 defined?

2,732 views
Skip to first unread message

Craig Latta

unread,
Mar 30, 1995, 3:00:00 AM3/30/95
to

Hi--

I'm trying to parse windows.h, and I'm losing on "__int64". Where is
that defined? Does windows.h have any prerequisites? Or are there some
things
which the kernel/compilers just magically know about? I'm using MS Visual
C++
as my header source.

Thanks in advance for answering what is probably/hopefully a very basic
question.


-C

--
Craig Latta <Craig...@NetJam.ORG>
"Instant monotony! Just ad nauseum!"

muza...@smixedsignal.com

unread,
Mar 30, 1995, 3:00:00 AM3/30/95
to

In article <3lf2ia$1...@hustle.rahul.net>, <Craig...@NetJam.ORG> writes:
> Hi--
>
> I'm trying to parse windows.h, and I'm losing on "__int64". Where is
> that defined? Does windows.h have any prerequisites? Or are there some
> things which the kernel/compilers just magically know about? I'm using MS
> Visual C++ as my header source.
> Thanks in advance for answering what is probably/hopefully a very basic
> question.

this is going to sound obnoxious (sp?) but it is the simple fact.
__int64 is defined at the same place with int and long (also char).

Hope this helps.

PS this means that __int64 is a basic type of the C/C++ language implementation
of MS.

Muzaffer

standard disclaimer

Mark Thornton

unread,
Mar 31, 1995, 3:00:00 AM3/31/95
to
> I'm trying to parse windows.h, and I'm losing on "__int64". Where
__int64 is a basic type in VC++ 2.0.

Mark Thornton
Optrak Distribution Software Ltd.

Bill McCormick

unread,
Mar 31, 1995, 3:00:00 AM3/31/95
to
In article <3lf2ia$1...@hustle.rahul.net>, Craig Latta <Craig...@NetJam.ORG> says:
> I'm trying to parse windows.h, and I'm losing on "__int64". Where is
>that defined? Does windows.h have any prerequisites? Or are there some
>things
>which the kernel/compilers just magically know about? I'm using MS Visual
>C++
>as my header source.

It's defined as a Microsoft C extension (see the README files included
with the compiler).

__int8, __int16, __int32, and __int64 are all available in both signed
and unsigned versions Quite handy.

--
"Nothing in the world is more dangerous than sincere ignorance and
conscientious stupidity" -- Martin Luther King, Jr.
"Having a passionate committment to social justice does not excuse you from
knowing what in the hell you're talking about" -- Corollary #1

Thomas Nimstad

unread,
Apr 2, 1995, 4:00:00 AM4/2/95
to
muza...@smixedsignal.com writes:
> this means that __int64 is a basic type of the C/C++ language implementation
> of MS.

Yepp, but only with normal operators, they forgot to implement the itoa and atoi
functions ...

// JTN <j...@jd.se>

---
* Thomas Nimstad * #pragma message("Standard disclaimer in use")
* Juristdata AB, SWEDEN * Professional development for Win32
* Phone +46-500 412150 * Fax +46-500 412848

Bob Withers

unread,
Apr 2, 1995, 4:00:00 AM4/2/95
to
Thomas Nimstad (j...@jd.se) wrote:

: muza...@smixedsignal.com writes:
: > this means that __int64 is a basic type of the C/C++ language implementation
: > of MS.

: Yepp, but only with normal operators, they forgot to implement the itoa and atoi
: functions ...

:

Is there a printf specifier for __int64?

--
Bob Withers This space is reserved.
bw...@mo.net Imagine a really cool picture here.

Bill McCormick

unread,
Apr 2, 1995, 4:00:00 AM4/2/95
to
In article <79683867...@jd.se>, j...@jd.se (Thomas Nimstad) says:
>
>muza...@smixedsignal.com writes:
>> this means that __int64 is a basic type of the C/C++ language implementation
>> of MS.
>
>Yepp, but only with normal operators, they forgot to implement the itoa and atoi
>functions ...

sscanf and sprintf are effective replacements.

--
"Nothing in the world is more dangerous than sincere ignorance and

conscientious stupidity" -- artin Luther King, Jr.

Bill McCormick

unread,
Apr 3, 1995, 3:00:00 AM4/3/95
to
In article <3ln2fk$e...@Twain.MO.NET>, bw...@MO.NET (Bob Withers) says:
>Thomas Nimstad (j...@jd.se) wrote:

>: muza...@smixedsignal.com writes:
>: > this means that __int64 is a basic type of the C/C++ language implementation
>: > of MS.
>
>: Yepp, but only with normal operators, they forgot to implement the itoa and atoi
>: functions ...
>:
>
>Is there a printf specifier for __int64?

Yes. Here's some info from a VC+ 2.10 prerelease readme.
=================================================

64-bit Integers
In addition to the __int8, __int16, and __int32 "sized integer" support
documented in the C Language Reference and C++ Language Reference,
this Visual C++ 2.1 Beta release provides partial support for 64-bit
integers. To declare a 64-bit integer, use the __int64 keyword.

This release does not provide fully integrated debugger support
for 64-bit integers, but they are recognized and can be displayed by
the debugger in hexadecimal format. 64-bit integers will be fully
supported in the Visual C++ 2.1 final release version.

Using printf and scanf with 64-bit Integers
You can use the __int64 data type with the printf and scanf
function families.

A printf format specification, which consists of optional and
required fields, has the following form:

%[flags] [width] [.precision] [{h | l | I64 | L}]type

A scanf format specification, which also consists of optional
and required fields, has the form
%[*] [width] [{h | l | I64 | L}]type

The I64 optional prefix to the type specifier indicates that the
corresponding argument is a 64-bit integer. To specify _int64,
you can use the size prefix I64 with the type specifier d, i, o,
u, x, or X. The type prefix I64 is a Microsoft extension and is
not ANSI-compatible. For more information, see printf and scanf
in the Run-Time Library Reference.

--
"Nothing in the world is more dangerous than sincere ignorance and

conscientious stupidity" -- Martin Luther King, Jr.

Chris Marriott

unread,
Apr 3, 1995, 3:00:00 AM4/3/95
to
In article <3ln2fk$e...@Twain.MO.NET> bw...@MO.NET "Bob Withers" writes:

>Thomas Nimstad (j...@jd.se) wrote:
>: muza...@smixedsignal.com writes:
>: > this means that __int64 is a basic type of the C/C++ language
> implementation
>: > of MS.
>
>: Yepp, but only with normal operators, they forgot to implement the itoa and
> atoi
>: functions ...
>:
>
>Is there a printf specifier for __int64?

Yes - add "I64" to the normal format, eg:

__int64 a;
printf( "%I64d", a );

It's documented in the VC++ release notes.

Chris
--
--------------------------------------------------------------------------
| Chris Marriott, Warrington, UK | Author of SkyMap v2 shareware |
| ch...@chrism.demon.co.uk | astronomy program for Windows. |
| For more info, see http://www.winternet.com/~jasc/skymap.html |
| Author member of Association of Shareware Professionals (ASP) |
--------------------------------------------------------------------------

Thomas Nimstad

unread,
Apr 5, 1995, 3:00:00 AM4/5/95
to
bw...@MO.NET (Bob Withers) writes:
>Thomas Nimstad (j...@jd.se) wrote:
>: muza...@smixedsignal.com writes:
>: > this means that __int64 is a basic type of the C/C++ language implementation
>: > of MS.
>: Yepp, but only with normal operators, they forgot to implement the itoa and atoi
>: functions ...
> Is there a printf specifier for __int64?

I just found it :

__int64 Value = 0xffffffff;
Value++;
sprintf(text, "Value = %I64x", Value);

Cool !

0 new messages