Re: one-liner for characater replacement
- From: David Thompson <dave.thompson2@xxxxxxxxxxx>
- Date: Tue, 10 Jun 2008 04:36:36 GMT
On Fri, 30 May 2008 18:48:07 GMT, "James Giles"
<jamesgiles@xxxxxxxxxxxxxxxx> wrote:
analyst41@xxxxxxxxxxx wrote:
Until 99 it did, although not quite the same as FORTRAN's.Its such alleged warts of f77 that actually led to its phenomenal
success and it was destroyed by a language (C) that had no safety net
for the programmer at all (at least back in the dying off period of
Fortran - I wouldn't be surprised if the custodians of C are now
tyring to kill it by making it "safe".).
Yet C *doesn't* have implicit typing. Hmm. Evidently not the
panacea you're making it out to be.
Through C89 (and C95):
You can't leave a variable undeclared completely, but in the
declaration you can omit the type and it is assumed 'int', as long as
you have something else in the syntactic position of decl-specifiers.
In particular you can have only a storage-class e.g. 'static', or only
a qualifier e.g. 'const'.
You _can_ leave a function undeclared and it is assumed 'function of
unspecified but fixed default-promoted arguments returning int'. (This
is actually a separate feature -- 'implicit function decl' rather than
'implicit int' -- but it is so similar most folks lump them together.)
Where you write a function declaration again you can omit the type if
you have a 'storage' (here, linkage) class, or qualifier but only for
a pointer return type because a function's direct return type cannot
be qualified. (Qualification only makes sense for things in storage
aka variables, and function returns aren't in storage.)
Where you write a function _definition_ (implementation) you can omit
the type giving 'int', and without any (other) specifiers needed.
- formerly david.thompson1 || achar(64) || worldnet.att.net
.
- Prev by Date: Re: optimizing question
- Next by Date: Re: save statement in a module
- Previous by thread: Re: one-liner for characater replacement
- Next by thread: Is anyone using PGI's pghpf on RHEL 5.2 Server? I get a runtime error: 0: global heap address mismatch
- Index(es):
Relevant Pages
|
|