long int versus long 
Author Message
 long int versus long

NOTE: My apologies if this is a duplicate post.  I am posting from Deja
because my posts from work do not appear to be propagating.

    I was reading the FAQ when I thought of this questions, so I'm
pretty sure that it's not already there.  The FAQ mentions the
difference between "long int" and "long long" (which is non-standard). I
was curious if there was a difference between "long int" and just
"long", either on implementation or standards.  TIA.

        - Bob Bell

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long


Quote:
>NOTE: My apologies if this is a duplicate post.  I am posting from Deja
>because my posts from work do not appear to be propagating.

>    I was reading the FAQ when I thought of this questions, so I'm
>pretty sure that it's not already there.  The FAQ mentions the
>difference between "long int" and "long long" (which is non-standard). I
>was curious if there was a difference between "long int" and just
>"long", either on implementation or standards.  TIA.

No, both these type specifier lists are synonyms for the same type.  It takes
less typing to just use long instead of long int, or unsigned instead of
unsigned int, and so on.

--
#exclude <windows.h>



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:

> I
> was curious if there was a difference between "long int" and just
> "long", either on implementation or standards.  TIA.

no, there isn't.

--
              /"\                              m i k e    b u r r e l l

               X        AGAINST HTML MAIL
              / \



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:

>NOTE: My apologies if this is a duplicate post.  I am posting from Deja
>because my posts from work do not appear to be propagating.

>    I was reading the FAQ when I thought of this questions, so I'm
>pretty sure that it's not already there.  The FAQ mentions the
>difference between "long int" and "long long" (which is non-standard). I
>was curious if there was a difference between "long int" and just
>"long", either on implementation or standards.  TIA.

There's no difference.  long, signed long, long int, and signed long int are
defined to designate the same type.  Other ways of specifying the same type
are "int long", "long signed", "long int signed", and "long signed int",
"int signed long", "int long signed", and "signed int long".

And the word "signed" starts to look really odd after you type it enough
times in succession.
--

Kenan Systems Corp., a wholly-owned subsidiary of Lucent Technologies



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:

> You can get a copy of the draft C standard for nothing and the real thing is
> fairly inexpensive.

It is?  From whom?  Last I checked it was, IIRC, about $200.


Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long
Quote:
>     I was reading the FAQ when I thought of this questions, so I'm
> pretty sure that it's not already there.  The FAQ mentions the
> difference between "long int" and "long long" (which is non-standard). I
> was curious if there was a difference between "long int" and just
> "long", either on implementation or standards.  TIA.

Here int is implied, AFAIK.

Andreas Krennmair



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:

> The C++ standard can be had for a song (I forget what but it is well under
> $100 in electronic format).  I wonder why the C standard costs more?

This is a no-brainer. Why does the C Standard cost more? Because it's
worth more, of course!

:-)

--

Richard Heathfield

"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.

C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
29 K&R Answers: http://users.powernet.co.uk/eton/kandr2/index.html (68
to go)



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:
>difference between "long int" and "long long" (which is non-standard). I

long long *is* standard. The question is that the compilers are not yet.

--
-hs- "Stove"
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://www.dinkum.com/htm_cl
"Really?  When run on my machine, a printed copy of the C FAQ leaps
from the monitor and whacks me over the head.." -- Chris Mears CLC



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:

> NOTE: My apologies if this is a duplicate post.  I am posting from Deja
> because my posts from work do not appear to be propagating.

>     I was reading the FAQ when I thought of this questions, so I'm
> pretty sure that it's not already there.  The FAQ mentions the
> difference between "long int" and "long long" (which is non-standard). I
> was curious if there was a difference between "long int" and just
> "long", either on implementation or standards.  TIA.

"long long" is now standard.

   long x;      /* x is a long int */

--

What one knows is, in youth, of little moment; they know enough who
know how to learn. - Henry Adams

A thick skin is a gift from God. - Konrad Adenauer
__________________________________________________________
Fight spam now!
Get your free anti-spam service: http://www.brightmail.com



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:

>> You can get a copy of the draft C standard for nothing and the real thing is
>> fairly inexpensive.

>It is?  From whom?  Last I checked it was, IIRC, about $200.

Depends on your definition of expensive. If you're an ex-Y2K
programmer living off your ill-gotten gains, then 200 bucks is
probably chickenfeed. :-)
Mark McIntyre

C- FAQ: http://www.eskimo.com/~scs/C-faq/top.html



Sun, 29 Sep 2002 03:00:00 GMT  
 long int versus long

Quote:



> >> You can get a copy of the draft C standard for nothing and the real thing is
> >> fairly inexpensive.

> >It is?  From whom?  Last I checked it was, IIRC, about $200.

> Depends on your definition of expensive. If you're an ex-Y2K
> programmer living off your ill-gotten gains, then 200 bucks is
> probably chickenfeed. :-)

Well, unfortunately, I'm an undergrad living off my academic
scholarship and my summer earnings...  $200 is about 3% of my
total liquid assets right now, a not insignificant amount
IMO... :-)


Sun, 29 Sep 2002 03:00:00 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 

1. char size (was long long long long long int)

2. typecasting int to long long int

3. long long long long integers

4. long long int

5. long long int into octets (and back again)

6. long long int

7. unsigned long long int

8. long long int

9. Assigning and printing long long int's

10. long long int

11. Help! INT longer than LONG

12. short/long/long long Formatting questions

 

 
Powered by phpBB® Forum Software