View Single Post
Old May 29th, 2007, 12:40 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
end:
jmp terminate
terminate:
Look at this and apply a little thought. Execution normally proceeds to the next instruction. A branch or call modifies that. Jumping to the next instruction is just a waste (as mentioned in Grim's post).

Now suppose you remove the worthless jump. The end and terminate labels now represent the same address. That doesn't consume any code or take any time, but what the hell good is it, except for introducing confusion?

I don't care how many trees you kill. Use a pencil and paper to solidify your thoughts. Trace lines from here to there. Disentangle spaghetti. Better to kill a tree than an innocent person when your critical code goes south.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote