declaring variable
Chris Torek
chris at mimsy.UUCP
Tue Apr 11 07:27:50 AEST 1989
In article <16969 at cup.portal.com> Kevin_P_McCarty at cup.portal.com writes:
[referring to the `declaration' sequence `double A, ...; WhatAmI, ...']
>tcc -c -A test1
>Turbo C Version 2.0 Copyright (c) 1987, 1988 Borland International
[errors]
I do not recall whether the original question referred specifically
to Turbo C version 2.0. In any case, it is worth noting that in some
Classic C compilers, naming a variable outside a function without
giving a type declares that variable as an integer. Thus:
nwords;
main()
{
...
produces the global integer variable `nwords'.
This was not legal in the dpANS when last I checked (which was before
it became a pANS).
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list