K
Keith Thompson
Richard said:I dont care if you object or not. C has global variables. However you
want to obfuscate it by referring to the standard. This group is not C89
you know. Or C99.
Referring to the standard is obfuscation? That's a new one.
It's about C.
Whether you like it or not.
And however I produce them, e.g using extern or not, C has variables
that can be accessed from everywhere in a statically linked program.
To anyone who speaks English this is a global variable.
But then I inhabit the real world where people talk about real things
and not some dusty, confusing paragraph in a standard.
I'd be glad to explain any passages that you find confusing.
You think that the term "global variable" is perfectly clear. You may
well be right. But if you're not able to provide a definition, then I
suggest that you don't really understand yourself what it means.
Apparently you think it has something to do with statically linked
programs. I find that surprising. Would you care to elaborate on
that point?
If you do choose to offer a definition, please consider this case: An
object declared within a function with the "static" keyword can be
accessed from anywhere in a program via its address. For that matter,
an object declared within a function (e.g., within main) *without* the
"static" keyword can likewise be accessed from anywhere in a program
via its address, as long as any such access occurs only within its
lifetime. I presume you don't intend the term "global variable" to
cover these cases.
You're assuming that it's obvious to everyone what a "global variable"
is. Prove it. Start by proving that you know what it is.