Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!ames!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.c Subject: Re: int divided by unsigned. Message-ID: <13986@lanl.gov> Date: 13 Jul 89 00:25:13 GMT References: <66203@yale-celray.yale.UUCP> Distribution: na Organization: Los Alamos National Laboratory Lines: 18 From article <66203@yale-celray.yale.UUCP>, by Horne-Scott@cs.yale.edu (Scott Horne): > [...] You probably don't want to make `int' a three-byte type; thus, make > it four bytes. (This is consistent with your twice-the-size argument, too.) > What to do with `long'? Well, you want it to be at least twice the size of > an `int'. But that's eight bytes--and the machine instructions can't handle > eight-byte integers conveniently! Heavens above! [...] Oh, gee ... The language design might not be _convenient_ for some machines. That means my Smalltalk environment on the PC (with arbitrary precision integer arithmetic) has done something _inconvenient_. I have other _compiled_ languages which have 64 bit integers, why can't C? > Other problems arise, such as alignment. Anyway, your demands force all > implementations to use 1-byte `char's, 2-byte `short's, and 4-byte `int's. > Doesn't this seem daft? No, "daft" isn't the word I'd choose. I might lean toward "portable", or "well defined", but certainly not "daft".