Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP
Path: utzoo!linus!philabs!seismo!rlgvax!cvl!umcp-cs!chris
From: chris@umcp-cs.UUCP
Newsgroups: net.lang.c
Subject: Array Initialization & Whitesmith's
Message-ID: <792@umcp-cs.UUCP>
Date: Wed, 13-Jul-83 22:34:17 EDT
Article-I.D.: umcp-cs.792
Posted: Wed Jul 13 22:34:17 1983
Date-Received: Thu, 14-Jul-83 20:13:57 EDT
References: <413@ut-ngp.UUCP>, <140@ihu1f.UUCP>
Organization: Univ. of Maryland, Computer Science Dept.
Lines: 29

Actually, at least in the C compilers we have from Whitesmiths, the
problem is not that the compiler doesn't initialize statics to zero.
The problem is that the compiler doesn't handle statics, or global
variables, correctly AT ALL.  (begin flame)  The program

	int variable;
	main (argc, argv) { ; }

will produce, when compiled, the error message

	Undefined: variabl

(or something like that).  Would you believe, Whitesmiths doesn't
define a global variable unless you initialize it?  It's true!  I spent
*hours* agonizing over this one once.  That ain't C.  A variable that
is declared outside of any program block should NOT default to
external!  Declaring a variable twice is an error (though Unix &
friends kindly handle it correctly anyway).  There should be exactly
one occurrance of "int foo;" or "int foo=x;"; any other declaration
should have the word "external" in front of it.  But NOOO, they
couldn't do THAT.  That'd make it too easy to use!  (end flame)
Other than that, Whitesmith's seems to be a pretty reasonable
implementation.

					- Chris
-- 
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs
ARPA:	chris.umcp-cs@UDel-Relay