Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site opus.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!ucbvax!ucbcad!tektronix!hplabs!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP Newsgroups: net.unix-wizards Subject: confusion on globals, externals? Message-ID: <543@opus.UUCP> Date: Sat, 16-Jun-84 00:58:02 EDT Article-I.D.: opus.543 Posted: Sat Jun 16 00:58:02 1984 Date-Received: Tue, 19-Jun-84 01:26:22 EDT References: <535@opus.UUCP> <3952@utzoo.UUCP> Organization: NBI, Boulder Lines: 21 On a tangent from the external-variable discussion... >He's made the same mistake as several people that sent mail to me >privately: he has confused the words "external" and "global". I did >not say "global variables are bad", I said "external variables are bad". >I never said that variables with longer lifetimes than a single function >invocation are a poor idea... We've got confused terminology here. "Global" refers to scope (visibility) of a variable, not to extent (lifetime). It means, roughly, "visible everywhere" just as the name indicates. "External" also refers to scope; it means, in C terms, a variable defined in another module. Given the scoping rules for C, an external variable IS global. I believe that the intent was to point out that the problem lies in the global visibility, not in the static allocation. I agree here; the need for global variables is fairly rare and they do admit the possibility of misuse. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Cerebus for dictator!