Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!topaz.rutgers.edu!hedrick From: hedrick@topaz.rutgers.edu.UUCP Newsgroups: comp.unix.wizards Subject: Re: Supercomputer Unix decisions (really type sizes) Message-ID: <12670@topaz.rutgers.edu> Date: Sun, 14-Jun-87 03:39:04 EDT Article-I.D.: topaz.12670 Posted: Sun Jun 14 03:39:04 1987 Date-Received: Sun, 14-Jun-87 19:43:13 EDT References: <3659@spool.WISC.EDU> <743@geac.UUCP> <4679@columbia.UUCP> <420@elxsi.UUCP> <1124@copper.TEK.COM> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 16 Unfortunately in C (as most other languages) there is no distinction between how you describe variables to be used within your program and how you describe external objects. The result is that network code and code that handles records on tapes, etc., is full of descriptions that use char, short and long, to refer to 8, 16, and 32 bit quantities. Frankly I think this is a mistake. I think we should have a separate way of declaring external objects that is independent of the machine's byte order, word size, etc. But at the moment there isn't much choice. Those of us who write portable code have gotten used to the fact that you can't be sure of the size of int and pointers. But if we are to have any hope of writing portable network code, there has to be some way to say that something is a 16 or 32 bit object. Currently short and long are it. Anybody have a better idea? The only alternative I can think of is to use long:16 and long:32. Presumably that would continue to work if longs expanded. But I think most people would find this impossibly ugly.