P
pete
At the point in the thread when you wrote that,
were you aware of the part of the standard which you quoted below,
where stdin is defined as a pointer expression ?
It doesn't have to be a macro.
Who said you did?
That's one example of loose terminology.
Your quoted standard text would look pretty funny
if the standard were consistent with that usage:
Loose terminology in the C standard was my point.
The meaning of stdin,
is the topic of the subject line of this thread.
Now there,
the standard is plainly describing the relationship
between stdin and the standard input stream,
and they are two different things.
If you want to call that "an abstraction",
(defining two seperate things and then calling one of them
by the name of the other)
then abstraction doesn't belong in the standard,
and there is no other abstraction like that
anywhere else in the standard.
My answer to OP's question in the subject line is:
A keyboard is one kind file commonly associated with the
standard input stream.
stdin is a pointer expression, pointing to an object
associated with the standard input stream.
were you aware of the part of the standard which you quoted below,
where stdin is defined as a pointer expression ?
.. which represents a stream.
It's a macro that expands to a pointer to 'FILE'
It doesn't have to be a macro.
I didn't say that stdin is or is not a stream.
Who said you did?
I would say that the expression 'stdin' *denotes* a stream,
That's one example of loose terminology.
Your quoted standard text would look pretty funny
if the standard were consistent with that usage:
which led to my 'loose' term 'pointer to a stream'.
Loose terminology in the C standard was my point.
The meaning of stdin,
is the topic of the subject line of this thread.
7.19 Input/output <stdio.h>
7.19.1 Introduction
1 The header <stdio.h> declares three types, several macros,
and many functions for performing input and output.
2 The types declared are ...
[...]
FILE
which is an object type capable of recording all the
information needed to control a stream, including its
file position indicator, a pointer to its associated
buffer (if any), an error indicator that records whether
a read/write error has occurred, and an end-of-file
indicator that records whether the end of the file has
been reached
[...]
3 The macros are ...
[...]
stderr
stdin
stdout
which are expressions of type "pointer to FILE" that
point to the FILE objects associated, respectively,
with the standard error, input, and output streams.
Now there,
the standard is plainly describing the relationship
between stdin and the standard input stream,
and they are two different things.
I don't think calling a 'FILE' an abstraction of a stream
is inaccurate.
If you want to call that "an abstraction",
(defining two seperate things and then calling one of them
by the name of the other)
then abstraction doesn't belong in the standard,
and there is no other abstraction like that
anywhere else in the standard.
But I suppose we're only mincing words here.
My answer to OP's question in the subject line is:
A keyboard is one kind file commonly associated with the
standard input stream.
stdin is a pointer expression, pointing to an object
associated with the standard input stream.