Re: function to return pointer question
Ark said:
No.
No.
So do operators. That doesn't make them objects either.
Yes.
It is "a region of data storage in the execution environment, the contents
of which can represent values."
Yes, they are expressions, and they have a type and a value. But being an
expression is not enough to make you an object.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
email: rjh at the above domain, - www.
Ark said:
Richard Heathfield wrote:
<snip>
>>
>Yes, and both the C89 Standard and the C99 Standard refer to "the value
>of CHAR_MIN" when describing numerical limits, even though it is quite
>evident that CHAR_MIN is not an object. So, one way or another, the C99
>Standard is wrong.
>>
><snip>
>>
>
Assuming e.g.
#define CHAR_MIN (-128)
isn't it true that CHAR_MIN is a const object of type int and value
-128?
>Keith Thompson said:
>>
>>
>>That would seem to imply that an expression such as 42, that doesn't
>>refer to any object, does not yield a "value". I've always thought of
>>a "value" as being either the interpreted contents of an object *or*
>>the result of an expression.
>>refer to any object, does not yield a "value". I've always thought of
>>a "value" as being either the interpreted contents of an object *or*
>>the result of an expression.
>Yes, and both the C89 Standard and the C99 Standard refer to "the value
>of CHAR_MIN" when describing numerical limits, even though it is quite
>evident that CHAR_MIN is not an object. So, one way or another, the C99
>Standard is wrong.
>>
><snip>
>>
Assuming e.g.
#define CHAR_MIN (-128)
isn't it true that CHAR_MIN is a const object of type int and value
-128?
And likewise 42U a const object of type unsigned int and value 42?
Oh, it lacks an address but so do register variables.
Am I wrong?
What's an object anyway then?
of which can represent values."
In any case, 42 and CHAR_MIN are expressions, so they have a type and a
value.
value.
expression is not enough to make you an object.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
email: rjh at the above domain, - www.
Comment