Thread: [Solved] Skip an instruction?
View Single Post
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 09-08-2018 , 18:36   Re: Skip an instruction?
Reply With Quote #3

Let me elaborate.

PHP Code:
if(a)
{
    return 
1;
}
if(
b)
{
    return 
2;
}
if(
c)
{
    return 
3;

In my above example if a,b,c are all bool variables. Now if a code is written out like this then the moment a becomes true my function will return 1 and rest won't execute. Same for b, but I only want to check, if c if true or false. Both a and b are stopping the function prematurely and it doesn't even run till c.

I thought of using NOPs, but would that not stop the whole function? If I was to NOP an instruction then would I NOP test or jz?
__________________
Spirit_12 is offline