Quick note about GOTOs:
THEY ARE FASTER THAN FUNCTIONS.
GOTO code in pseudo programming language:
x = 1 | 2
if x & 2 then goto _done
print "omg, where's my two?"
_done:
endProcess(getProcess())
EXPORTED TO ASM:
.code
mov dword [_x], dword 1
or dword [_x], dword 2
mov eax, dword [_x]
and eax, 2
je _done
push _0_string
call _print
add esp, 4
_done:
call _getProcess
push eax
call _endProcess
add esp, 4
.data
_0_string: db "omg, where's my two?", 0
Where as if _done was a function the pseudo programming language code would look like this:
declare function void done(void)
x = 1 | 2
if x & 2 then done()
print "omg, where's my two?"
done()
void done(void)
{
endProcess(getProcess())
}
Now, the output code would be basically the same, but with CALL instead of jump. In addition, if done() took parameters, then data would have to be pushed onto the stack. Besides, keywords such as IF/THEN/ELSE/SWITCH/CASE/etc.. basically make GOTOs in the exported ASM code anyways.
GOTO is FASTER than a function call, and takes less space.
if ranting > 1000 then finish_post = 1 : add_sig = "Cheers,\n\n -naota\n"
Cheers,
-naota
I'm not a dictator to those that do stuff for me by will. Only those who don't.