Is it standard and practical to use long long types?

K

Kevin Goodsell

Matt said:
Next time reply to the same person you seem to be addressing.

Next time don't post using weirdo fonts.

Next time try to give a reply that is useful to somebody.

You are being very rude. There was nothing wrong with Ioannis's message
(as far as I can see), and it's not his fault that the person he replied
to didn't include any context to clue him in to who originally asked the
question.

As for the usefulness of replies, as I've already said you can improve
this by posting appropriately (e.g., not cross-posting between
comp.lang.c and comp.lang.c++). And Ioannis's reply was worth every cent
you paid for it and more.

Keep this up and you'll find it difficult to get good responses in the
future.

-Kevin
 
N

Nils Petter Vaskinn

OMG. Is this my punishment for cross posting?

Yes :)

Seriously thogh, you now know that you can't have long long unless you
limit yourself to C99 compilers or C89 compilers with long long as an
extension, or C++ compilers with long long as an extension.
Now is the time for a new post (or two new posts if you want ansers
for both C and C++) where you tell us what you want to achieve and ask
about how to do it.

Something along the lines of

Q: I want to shuffle around data in 64 bit chunks
A: Use an array of bytes

Q: I want to do calculations on integers that require more than 32
bits of storage.
A: Look at bigint libraries, or roll your own.


Seriously these two groups is a great place to ask about how to do
anything in a compiler-independent standards-compliant way, the hard
part is phrasing the question right.
 
M

Martin Ambuhl

Nick Hounsome wrote:

The only thing that the standard gaurantees (I can't find the reference) is
that int is at least 32 bits.

There is a good reason that you can't find the reference: your
assertion is wrong.
 
K

Kevin Goodsell

Martin said:
Nick Hounsome wrote:




There is a good reason that you can't find the reference: your
assertion is wrong.

True. 'int' is only required to be at least 16 bits. There are also
numerous other guarantees: 'char' must be at least 8 bits, 'long' must
be at least 32, certain types may not have greater precision than
others, etc.

The size requirements are, as far as I know, not stated explicitly, but
are implied from other requirements. In particular, restrictions on how
integers may be represented, plus the required minimum ranges for the
integer types (e.g. -32,767 to 32,767 for 'int'), imply that they must
have at least some easily determined number of bits.

-Kevin
 
I

Ioannis Vranos

Joona I Palaste said:
Matt <[email protected]> scribbled the following





Ioannis's post appeared just fine on my newsreader. Ioannis is using
a Greek locale on his newsreader, as apparent from the ISO-8859-7
charset in his NNTP headers, but his post does not use any characters
from that charset. Perhaps your own newsreader insists on using
"weirdo fonts" for any charset that is not ISO-8859-1?


The strange thing is that in my Outlook Express preferences (both the Read
and Send section) i have set Western European (ISO) encoding. It is nice
that my MS program does what i have told it to do. :)






Ioannis Vranos
 
I

Ioannis Vranos

Matt said:
I cross-posted because I am asking the questions about both languages.


There is no long long in C++98 standard. I also hope that there will not be
one in C++0x.






Regards,

Ioannis Vranos
 
I

Ioannis Vranos

Ioannis Vranos said:
is


The strange thing is that in my Outlook Express preferences (both the Read
and Send section) i have set Western European (ISO) encoding. It is nice
that my MS program does what i have told it to do. :)


However in the new message window in Format::Encoding menu it had Greek as
preselected, i changed it to one message to Westen European (ISO) and now it
seems to remember it. Nice...






Ioannis Vranos
 
M

Matt

Ioannis said:
However in the new message window in Format::Encoding menu it had Greek as
preselected, i changed it to one message to Westen European (ISO) and now it
seems to remember it. Nice...






Ioannis Vranos

The post to which I am now replying appears to me in a normal-size font.
Your first post showed up tiny in my browser (Mozilla 1.4.1).
 
I

Ioannis Vranos

Matt said:
The post to which I am now replying appears to me in a normal-size font.
Your first post showed up tiny in my browser (Mozilla 1.4.1).


And entirely off topic in this world, i strongly suggest Mozilla Firefox.
It is my default browser now and i do not switch any kind of programs so
easily. Definetely it is worth to check it out.






Ioannis Vranos
 
M

Matt

Keith said:
Then it probably would have been better to post separately to each
newsgroup, since you're really asking two separate (but indirectly
related) questions.

Thank you. I see your point.

I often find it useful to understand one language in terms of the other.
 
I

Ioannis Vranos

Matt said:
I often find it useful to understand one language in terms of the other.


C and C++ follow two different evolution paths, e.g. C99 provides a complex
type as a built in "exotic" type, while C++98 provides a complex type as
part of the standard library, which can be defined using the core language
(as a template).






Ioannis Vranos
 
E

E. Robert Tisdale

Ioannis said:
C and C++ follow two different evolution paths,
?

e.g. C99 provides a complex type as a built in "exotic" type
while C++98 provides a complex type as part of the standard library
which can be defined using the core language (as a template).

What does the C++03 [draft] standard say about type complex?
Does anything prevent C++ from "absorbing" the C99 complex type?
 
M

Matt

Nils said:
Now is the time for a new post (or two new posts if you want ansers
for both C and C++) where you tell us what you want to achieve and ask
about how to do it.

Done. See my new post to comp.lang.c++ at 16:19 CST.
 
P

P.J. Plauger

Ioannis said:
C and C++ follow two different evolution paths,
?

e.g. C99 provides a complex type as a built in "exotic" type
while C++98 provides a complex type as part of the standard library
which can be defined using the core language (as a template).

What does the C++03 [draft] standard say about type complex?

Nothing that wasn't said in C++98.
Does anything prevent C++ from "absorbing" the C99 complex type?

Nope, and in fact it just did (sort of). At the meeting last month
in Sydney the committee voted to add *all* the library stuff added
with C99 to the (non-normative) Library TR scheduled for completion
this fall (northern hemisphere). It's done in such a way that you
can write essentially equivalent code using either the builtin
complex of C99 or the template class library version in C++.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
I

Ioannis Vranos

P.J. Plauger said:
Does anything prevent C++ from "absorbing" the C99 complex type?

Nope, and in fact it just did (sort of). At the meeting last month
in Sydney the committee voted to add *all* the library stuff added
with C99 to the (non-normative) Library TR scheduled for completion
this fall (northern hemisphere). It's done in such a way that you
can write essentially equivalent code using either the builtin
complex of C99 or the template class library version in C++.


And where and why the C99 "library" complex type and similar stuff are
needed in C++?






Ioannis Vranos
 
A

Alexander Malkis

I already needed unsigned long long in a GNU C++ program. It was a good
spare of programming time in comparisson to using some external "big
integer" libraries.
 
I

Ioannis Vranos

P.J. Plauger said:
>

C99 defines a handful of complex functions not defined in Standard C++.
The Library TR (aka TR1) adds these functions to C++.


Wouldn't it better if these functions would be new member functions of the
existing complex class?







Ioannis Vranos
 
M

Matt

Ioannis said:
Wouldn't it better if these functions would be new member functions of the
existing complex class?

Amazing. How far can somebody be out of touch with one of the original
essential major design criteria of C++? I am not referring to Mr.
Plauger or any of the committee members.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top