Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site whuxle.UUCP Path: utzoo!watmath!clyde!floyd!whuxle!mp From: mp@whuxle.UUCP (Mark Plotnick) Newsgroups: net.lang.c Subject: strcture comparisons, NULL, extern, and typedef Message-ID: <295@whuxle.UUCP> Date: Fri, 6-Apr-84 19:57:24 EST Article-I.D.: whuxle.295 Posted: Fri Apr 6 19:57:24 1984 Date-Received: Sat, 7-Apr-84 06:18:34 EST Organization: Bell Labs, Whippany Lines: 30 Some comments on recent events. Re structure comparison: A reference to the C Class system is "Adding Classes to the C Language: An Exercise in Language Evolution" by Bjarne Stroustrup, in Software - Practice and Experience, Feb. 1983. The system allows you to define abstract datatypes along with functions to manipulate those datatypes. The functions include overloaded binary operators, such as =, ==, and <. The functions can be implemented in-line if you wish. I hear that it is available to the outside world, or at least to Universities. Re NULL and pointers of different widths: Out of curiosity, does anyone know of any C compilers that do indeed implement pointers that are different physical widths? Some people mentioned the Prime and the PDP-10, but no specifics. The 2 PDP-10 C compilers I've seen both align everything on word boundaries (yes, a 10-element array of characters takes 10 words). A pointer is always an 18-bit value, right-justified in a 36-bit word. Re extern: Apparently "int foo();" and "extern int foo();" are equivalent, but try this on your pcc: typedef int func(); func alpha; You get "compiler error: compiler takes size of function". Oh well. extern func alpha; seems to work OK. Mark