Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!vrdxhq!bms-at!stuart From: stuart@bms-at.UUCP Newsgroups: comp.lang.c Subject: initializing null pointers Message-ID: <347@bms-at.UUCP> Date: Mon, 19-Jan-87 23:44:13 EST Article-I.D.: bms-at.347 Posted: Mon Jan 19 23:44:13 1987 Date-Received: Sun, 1-Feb-87 15:54:23 EST Organization: Business Management Systems, Inc., Fairfax, VA Lines: 12 A statically declared pointer is guaranteed to be initialized to NULL if no initializer (or 0) is given. What about pointer arrays allocated with calloc()? Does one have to initialize all the elements in a loop to be portable (despite the fact that it is unnecessary on most machines)? Evidently, yes. But is there a better way? In this repect, a built-in 'new' operator has some advantages. I already have lots of code that needs to be fixed to be portable :-( -- Stuart D. Gathman <..!seismo!dgis!bms-at!stuart>