Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site uiucuxc Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!inuxc!pur-ee!uiucdcs!uiucuxc!hamilton From: hamilton@uiucuxc.CSO.UIUC.EDU Newsgroups: net.lang.c Subject: Re: Uses of "short" ? Message-ID: <102500003@uiucuxc> Date: Wed, 9-Oct-85 16:11:00 EDT Article-I.D.: uiucuxc.102500003 Posted: Wed Oct 9 16:11:00 1985 Date-Received: Sat, 12-Oct-85 15:34:21 EDT References: <486@houxh.UUCP> Lines: 22 Nf-ID: #R:houxh.UUCP:-48600:uiucuxc:102500003:000:720 Nf-From: uiucuxc.CSO.UIUC.EDU!hamilton Oct 9 15:11:00 1985 too bad you can't do something like: #define INT(max) \ /* /usr/include/int.h */ #if max<32768 \ /* machine-dependent */ short \ #else \ long \ #endif INT(20000) x; /* -> short x; */ INT(50000) y; /* -> long y; */ with cpp. maybe m4? not real pretty, but then neither is "int16", etc. i think it makes more sense to declare value range(s) than significant bits. at the least, it provides an extra degree of self-documentation. (quick, somebody make me shut up before i say something nice about pascal!) wayne hamilton UUCP: {ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!hamilton ARPA: hamilton@uiucuxc.cso.uiuc.edu CSNET: hamilton%uiucuxc@uiuc.csnet USMail: Box 476, Urbana, IL 61801 Phone: (217)333-8703