Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site tikal.UUCP Path: utzoo!decvax!bellcore!petrus!sabre!zeta!epsilon!gamma!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tikal!bobc From: bobc@tikal.UUCP (Bob Campbell) Newsgroups: net.lang.mod2 Subject: Re: what is a WORD? Message-ID: <232@tikal.UUCP> Date: Tue, 3-Sep-85 12:48:29 EDT Article-I.D.: tikal.232 Posted: Tue Sep 3 12:48:29 1985 Date-Received: Wed, 4-Sep-85 00:41:57 EDT References: <1075@noscvax.UUCP> <222@tikal.UUCP> <138@graffiti.UUCP> Reply-To: bobc@tikal.UUCP (Bob Campbell) Distribution: na Organization: Teltone Corp., Kirkland, WA Lines: 33 Organizatio: Teltone Corporation, Kirkland, WA In article <138@graffiti.UUCP> peter@graffiti.UUCP (Peter da Silva) writes: >Sunds like a step backwards to me. 'C' handles all the word/byte/long/etc >arithmetic for you... and Modula 2 is supposed to be higher level than that. Does it really? it would seem to me that both 'C' and Modula-2 act the same with regard to the functioning of sizeof, TSIZE, and SIZE. They all return the size in the machines "smallest addressable unit" (a byte for machines which support them, and other odd things for other machines). A word is composted at least of one of the smallest addressable units and is the machines native data size. For pdp11's it is 16 bits or 2 bytes TSIZE(WORD) = 2 sizeof(int) = 2. For vaxes it is 32 bits or 4 bytes TSIZE(WORD) = 4 sizeof(int) = 4. (the 68000 is in question as it it not clear if it is best used as a 32 bit machine or a 16 bit machine but since the processor calls 16 bits a word and 32 bits a long it would best be implemented that way.) As for pointer arithmetic C treats address calulations as array indexing operations, this is a neat feature in a few cases, but this is not one of the high level features of C but instead is one of it's low level features. One which is used much too offen, and degrades the maintainability of C code. A good object code improver (some times called a optimizer incorrectly) would remove the most common advantages of using pointer arithmetic. ADDRESS arithmetic is not supported as a high level feature of Modula-2 it is instead supported as a low level feature, as the language accepts the fact that some programs require low level support. > I hope they fix this pronto. If it isn't broke don't fix it. Bob Campbell uw-beaver!tikal!bobc