Re: How to access the global
From: Kevin Bracey (kevin.bracey_at_tematic.com)
Date: 10/07/03
- Next message: Paul Brown: "Counter Intuitive Results: Optimising an FFT routine for Speed"
- Previous message: Slartibartfast: "Re: 1254-002 Cannot find a rule to create target /u02/apps_r/dev/ben/lib/fcfz02.a from dependencies."
- In reply to: dis: "Re: How to access the global"
- Next in thread: Nejat AYDIN: "Re: How to access the global"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 07 Oct 2003 14:59:13 +0100
In message <bltqls$cfq$1@news3.tilbu1.nb.home.nl>
"dis" <dis@hotmail.com> wrote:
> It would be more sensible to rename one of both variables, but one
> possibility would be:
>
> int x = 10;
> int main(void)
> {
> int x = 5;
> {
> extern int x;
> x; /* the expression x will evaluate to 10 */
> }
> return 0;
> }
That totally failed to occur to me (and all the other respondents I've seen).
I'm not sure whether to complement you on your C prowess, or be worried what
sort of programmer would have such a scoping construct at their fingertips.
-- Kevin Bracey, Principal Software Engineer Tematic Ltd Tel: +44 (0) 1223 503464 182-190 Newmarket Road Fax: +44 (0) 1223 503458 Cambridge, CB5 8HE, United Kingdom WWW: http://www.tematic.com/
- Next message: Paul Brown: "Counter Intuitive Results: Optimising an FFT routine for Speed"
- Previous message: Slartibartfast: "Re: 1254-002 Cannot find a rule to create target /u02/apps_r/dev/ben/lib/fcfz02.a from dependencies."
- In reply to: dis: "Re: How to access the global"
- Next in thread: Nejat AYDIN: "Re: How to access the global"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|