Re: Declarations in middle of C code?!
Re: Declarations in middle of C code?!
- Subject: Re: Declarations in middle of C code?!
- From: j o a r <email@hidden>
- Date: Mon, 5 Jan 2004 01:22:03 +0100
It's up to you, it comes down to personal preferences.
I like to be able to declare variables close to where they are used,
since you can limit the scope of the variable that way. If you keep
your methods small (which is a good thing in itself) it often doesn't
matter much, but to me it's still a good principle to follow.
That said, most of my colleagues still keeps the variables at the top
of the method, they think that they're easier to find that way. So,
like I said - in the end I think you will have to decide for
yourself... :)
j o a r
On 2004-01-05, at 01.00, Charles Srstka wrote:
>
Anyway, thanks for the info. Does anyone know whether using this new
>
feature the way it is commonly used in C++ is considered good style
>
for C code? Or is it better just to keep coding the old way, using
>
this ability only to insert logs in places where it would normally not
>
be possible?
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.