When to initialize the local variables?

C

Chris Dollin

MQ said:
Surely this is not always possible, say, when the variable is
initialised by a call to a function. Think scanf()...

Yes, it's not /always/ possible. But when it /is/ possible, I think it
is to be preferred.

As usual, clarity trumps everything [1] except user requirements.

[1] As you know, Bob, there are two trumps, either of which can be
a colour or a number.
 
C

CBFalconer

Chris said:
.... snip ...

[1] As you know, Bob, there are two trumps, either of which can be
a colour or a number.

I believe there are more. Ivana, ... :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,044
Members
48,769
Latest member
Clifft

Latest Threads

Top