Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>long long integer data type</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
long                     Long Integer Data Type

    The keyword long may be applied to the int and float types.  The long
    int type declares an object to be of "plain" integral type.  The size
    (and representation) of a long int object is implementation-defined;
    howerver, a long int is guaranteed to be the same or greater in size
    than an int.  Whether or not a "plain" long int is signed or unsigned
    is implementation-defined.  The type long float is an archaic synonym
    for the type double.

      Notes:    In MS-C, the size of a long int object is four bytes and
                "plain" long ints are signed.  That is, long int is
                equivalent to signed long int and its range of values is
                -2147483648 to 2147483647, inclusive.  A long float is
                eight bytes in size and it uses IEEE floating-point
                representation.

                One of the keywords signed and unsigned may be used as a
                prefix to long int, to identify the long integer as being
                signed or unsigned, respectively.

                If long is used without the keyword int or float, int is
                assumed.

                An integral constant with the suffix L (or l) is
                interpreted as a long int constant, as is any integral
                constant that is too big to be represented in an int.

                The ANSI C Standard has dropped support for long float as
                a synonym for double. Therefore, it is suggested you not
                use this archaic type.

  -------------------------------- Example ---------------------------------

           long int value = 6;
           long action_code = 'A';
           long int bit_pattern = '\xAB';
           long int counters[6];
           long *pointer_to_long_int;
           long int function();

           value = (long int) 123.45;
           value = (long) 123.45;
           value = 1234567L;
           value = 1234567l;

           long float average = 345.67;

           average = (long float) 1234;

See Also: Type Modifiers int short signed unsigned

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson