Getting rid of int

From: Jamie Vicary (Xjamie.Xvicary_at_Xmansf.Xox.Xac.Xuk)
Date: 08/25/04


Date: Wed, 25 Aug 2004 15:18:11 +0100

Dear all,

        I am writing a C library to deal with integer data for a specialised
task. I am only giving support for unsigned short, signed short,
unsigned long and signed long integers.

        I am neglecting signed and unsigned ints because, as far as I can tell,
shorts are 4 bit, longs are 8 bit, and ints are either 4 or 8 bits
depending on your compiler - seems like an unnecessary confusion to me.
The user should know whether 4 or 8 bits is right for her program, and
choose the right type accordingly.

        Given this ambiguity, why is the int type so extensively used? Is there
another advantage to having ints in addition to shorts and longs which I
haven't realised?

                Regards,

                        Jamie Vicary.



Relevant Pages

  • Re: Benefit of not defining the order of execution
    ... the contents of the log can vary depending on the evaluation order, ... execution is that the course of execution is not well defined. ... It can vary from environment to environment, from compiler to ... we need an additional suite of coding standards. ...
    (comp.lang.c)
  • Re: In-Out Parameters for functions
    ... > Why should buggy code work? ... As Ada stands now, it is perfectly ... the compiler cannot know whether particular ... then depending on the order of evaluation within an ...
    (comp.lang.ada)
  • Re: Request for testing of Reltive File status
    ... IBM ILE COBOL (or whatever the iSeries compiler is called now) ... Depending on your environment, you will probably have to modify the "ASSIGN ... Select RelFile Assign RelName ... Relative Key RelKey. ...
    (comp.lang.cobol)
  • RE: Keeping a handle on your transitions in a mixed assembly
    ... Then I could put something like this at the top of my perf ... Do you mean you would like the compiler could automatically define some ... Get Secure! ...
    (microsoft.public.dotnet.languages.vc)
  • Re: CL implementation
    ... Clisp may fit the requirements, depending on importance of a native ... compiler and your definition of completeness. ...
    (comp.lang.lisp)