which is faster, better, compiles into better code and such...
Code:bool function() { if (something) return true; return false; { or... bool function() { if (something) return true; else return false; }
which is faster, better, compiles into better code and such...
Code:bool function() { if (something) return true; return false; { or... bool function() { if (something) return true; else return false; }
Why not get your compiler to show the assembler it produces for this code?
The difference will either be non-existant, or so small to be of no practical interest.
The rest is just style IMO
Besides
Just evaluates the boolean expression and returns it's resultCode:bool function ( ) { return something; }
Youre right, the difference is completely insignificant
but I was just wondering
and out of curiosity, how do i make my compiler spit out ASM(thats MSVC++ for me).
i learned ASM on my TI-83+ graphing calculator, and id be interested in learning something about it on a computer.
project->settings->c++->category->listing files->Listing file type->assembly with source codeOriginally posted by phatslug
and out of curiosity, how do i make my compiler spit out ASM(thats MSVC++ for me).
when has the the bool data type become legal in C??
Mr. C
Sorry, this is C++ not C. My mistake
Mr. C.