Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #9968 > unrolled thread
| Started by | yoxoman <invalid@invalid.invalid> |
|---|---|
| First post | 2011-09-06 18:30 +0000 |
| Last post | 2011-09-07 05:25 -0700 |
| Articles | 7 — 7 participants |
Back to article view | Back to comp.lang.c
FILE type yoxoman <invalid@invalid.invalid> - 2011-09-06 18:30 +0000
Re: FILE type Jonathan Leffler <jleffler@earthlink.net> - 2011-09-06 14:39 -0700
Re: FILE type Keith Thompson <kst-u@mib.org> - 2011-09-06 14:39 -0700
Re: FILE type pete <pfiland@mindspring.com> - 2011-09-06 18:49 -0400
Re: FILE type DDD <1983ddd@gmail.com> - 2011-09-06 22:02 -0700
Re: FILE type Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-07 03:12 -0700
Re: FILE type gwowen <gwowen@gmail.com> - 2011-09-07 05:25 -0700
| From | yoxoman <invalid@invalid.invalid> |
|---|---|
| Date | 2011-09-06 18:30 +0000 |
| Subject | FILE type |
| Message-ID | <4e6666b7$0$31779$426a74cc@news.free.fr> |
Hi, Is there a reason why the FILE type (from stdio) is written uppercase ? Is it related to its opaque nature ? Thanks.
[toc] | [next] | [standalone]
| From | Jonathan Leffler <jleffler@earthlink.net> |
|---|---|
| Date | 2011-09-06 14:39 -0700 |
| Message-ID | <POadnXKfu9OEDvvTnZ2dnUVZ_hOdnZ2d@earthlink.com> |
| In reply to | #9968 |
On 9/6/11 11:30 AM, yoxoman wrote: > Is there a reason why the FILE type (from stdio) is written uppercase ? > Is it related to its opaque nature ? That was how it was first produced; the standard standardized the prevailing practice. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2011.0612 -- http://dbi.perl.org/
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-06 14:39 -0700 |
| Message-ID | <lnliu1pcyk.fsf@nuthaus.mib.org> |
| In reply to | #9968 |
yoxoman <invalid@invalid.invalid> writes:
> Is there a reason why the FILE type (from stdio) is written uppercase ?
> Is it related to its opaque nature ?
Macros are conventionally written in all-caps.
I'm not sure of this, but it's possible that the FILE type was first
introduced when typedef had not yet been added to the language.
If so, the original definition might have been something like:
struct __file_info {
/* ... */
};
#define FILE struct __file_info
In modern C it has to be a typedef (there's no permission to define
it as a macro), but the name stuck.
Another distinct possibility is that whoever invented the name
just thought putting it in all-caps would be a good idea. The C
standard library is not noted for being 100% consistent.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | pete <pfiland@mindspring.com> |
|---|---|
| Date | 2011-09-06 18:49 -0400 |
| Message-ID | <4E66A381.7AF3@mindspring.com> |
| In reply to | #9971 |
Keith Thompson wrote: > > yoxoman <invalid@invalid.invalid> writes: > > Is there a reason why the FILE type > > (from stdio) is written uppercase ? > > Is it related to its opaque nature ? > > Macros are conventionally written in all-caps. I think that C may be older than that convention. Besides the many lower case macros in the C library, there are also lower case macro examples in the standard such as str() and xstr(). -- pete
[toc] | [prev] | [next] | [standalone]
| From | DDD <1983ddd@gmail.com> |
|---|---|
| Date | 2011-09-06 22:02 -0700 |
| Message-ID | <3a116a86-28da-4d13-8345-9cf45259fc64@k9g2000vbd.googlegroups.com> |
| In reply to | #9974 |
On Sep 7, 6:49 am, pete <pfil...@mindspring.com> wrote: > Keith Thompson wrote: > > > yoxoman <inva...@invalid.invalid> writes: > > > Is there a reason why the FILE type > > > (from stdio) is written uppercase ? > > > Is it related to its opaque nature ? > > > Macros are conventionally written in all-caps. > > I think that C may be older than that convention. > > Besides the many lower case macros in the C library, > there are also lower case macro examples in the standard > such as str() and xstr(). > > -- > pete Maybe like @ as mail symbol. Why using @ but not other char
[toc] | [prev] | [next] | [standalone]
| From | Nick Keighley <nick_keighley_nospam@hotmail.com> |
|---|---|
| Date | 2011-09-07 03:12 -0700 |
| Message-ID | <6b555bc0-a75d-45f4-9c82-d269dfb47b38@et6g2000vbb.googlegroups.com> |
| In reply to | #9979 |
On Sep 7, 6:02 am, DDD <1983...@gmail.com> wrote: > On Sep 7, 6:49 am, pete <pfil...@mindspring.com> wrote: > > > > > > > Keith Thompson wrote: > > > > yoxoman <inva...@invalid.invalid> writes: > > > > Is there a reason why the FILE type > > > > (from stdio) is written uppercase ? > > > > Is it related to its opaque nature ? > > > > Macros are conventionally written in all-caps. > > > I think that C may be older than that convention. > > > Besides the many lower case macros in the C library, > > there are also lower case macro examples in the standard > > such as str() and xstr(). > > Maybe like @ as mail symbol. Why using @ but not other char[?] because it's prnounced "at" nick keighley AT hotmail.com The old JANET network used to put addresses before names (seems a sensible order for a computer), X.400 is just... ik
[toc] | [prev] | [next] | [standalone]
| From | gwowen <gwowen@gmail.com> |
|---|---|
| Date | 2011-09-07 05:25 -0700 |
| Message-ID | <691347ab-a13a-4bfd-b121-61eb1e7c2d29@j1g2000yqn.googlegroups.com> |
| In reply to | #9981 |
On Sep 7, 11:12 am, Nick Keighley <nick_keighley_nos...@hotmail.com> wrote: > The old JANET network used to put addresses before names (seems a > sensible order for a computer), As did UUCP bang paths, for essentially the same reason (users were better at routing than systems)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.c
csiph-web