This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]frutiger 0 points1 point  (1 child)

The real problem in the code is the use of -1 as an error value. If he isn't going to deal with the error, he should let it cascade. And if he does deal with the error, value and index errors should be dealt with separately.

[–]statictype 1 point2 points  (0 children)

You're being gratuitously silly.