Re: Declaring variables outside subroutines
From: Joe Smith (Joe.Smith_at_inwap.com)
Date: 03/26/04
- Next message: .a.c.: "Re: Unix sokets and signal handling"
- Previous message: Joe Smith: "Re: I want to scanf, dammit!"
- In reply to: Appoooh: "Declaring variables outside subroutines"
- Next in thread: Vetle Roeim: "Re: Declaring variables outside subroutines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 26 Mar 2004 09:47:18 GMT
Appoooh wrote:
> I'm no guru, and I haven't been programming professionally for long, but I
> can't help finding it disturbing that in the code below, $var is in scope
> within the subroutine foo. This is a bit eccentric compared to C++ or Java
It's standard procedure for creating static variables in C.
-Joe
- Next message: .a.c.: "Re: Unix sokets and signal handling"
- Previous message: Joe Smith: "Re: I want to scanf, dammit!"
- In reply to: Appoooh: "Declaring variables outside subroutines"
- Next in thread: Vetle Roeim: "Re: Declaring variables outside subroutines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
Loading