Re: one-liner for characater replacement



On Fri, 30 May 2008 18:48:07 GMT, "James Giles"
<jamesgiles@xxxxxxxxxxxxxxxx> wrote:

analyst41@xxxxxxxxxxx wrote:

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.

Until 99 it did, although not quite the same as FORTRAN's.
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
.



Relevant Pages

  • Re: GCC bitfield packing
    ... The actual amount of storage taken us depends only upon the number of ... The size of the storage unit that those bits are stored ... depend upon the type of the bitfield declaration. ... _Bool, int, signed int, and unsigned int. ...
    (comp.std.c)
  • Re: declaration vs. defintion
    ... |> | You shouldn't think of it in terms of storage being allocated. ... | They just stand there for the compiler to use as it thinks fit. ... |> int Five; ...
    (alt.comp.lang.learn.c-cpp)
  • Re: How to eliminate this global variable, silent?
    ... Joe Wright wrote: ... "An object, sometimes called a variable, is a location in storage and its interpretation depends on two main attributes: its storage class and its type." ... you would probably agree that you are allocating an array of 10 ... I would say this allocates an array 10 of int. ...
    (comp.lang.c)
  • Re: Multidimensional Packed Bit Array
    ... the offset and multiplier for each dimension is simply the total size of the ... I'm having troubles with calculating the required size of the storage and ... private int[] bitSize; ... int location = GetLocation; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: volatile
    ... >> meaning and use of the volatile qualifier. ... > int main (void) ... > volatile int x; ...
    (comp.lang.c)