Style (?) issue

Jan 03, 2011 22 Replies

[snipped]

More or less.

Yes, both values are potentially 'valid' as inputs to the downstream program, _but_ in this case the program verifier should be changed to insure the null pointer case is adequately treated and the program proceeds to a correct state, 'correct' in this case having two senses, the one the verifier can examine that a branch of the program treats this case, and in the application realm that the program/device does what is sensible and adequate to the business it serves.

[snipped]

Yes. In fact reducing the need for so many special code returns and so the space of possible failure modes is an art in itself!

Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/

Em 4/1/2011 03:26, D Yuniskis escreveu: [snipped]

Humm... I think you need to think with more precision and have an accurate definition of terms.

An overflow is a _condition_ the program has reached. It can only be considered an error if in the specific application this leads to state which no useful progress of the program flow can be devised other than an 'error recovery' like asking the user to re-enter the numbers, etc.

Once you have a function that returns error codes, you have it!

Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required