The Dink Network

Reply to Re: Procedure opening/closing brackets

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 15th, 08:33 PM
spike.gif
Oh wow, I can't believe I was already chafing against stupid brackets 20 years ago.

My current understanding is that brackets to open and close procedures do literally nothing. Any code that's outside them is still treated as belonging to the procedure above it.

void main
say("hello, I'm main",1)

say("hello, I'm overwrite",1)

set_callback_random("boob",5000,0)

void boob
say("I'm booby",1)
sp_kill(&return,100)


void main( void )
{
say("hello, I'm main",1);
}

say("hello, I'm overwrite",1);
}
}
}
}
}
}}}}}
{
}

set_callback_random("boob",5000,0);

void boob( void )
{
say("I'm booby",1);
sp_kill(&return,100);
}


Both of those scripts should just skip straight to "hello, I'm overwrite!" and call the boob procedure. In the first script, though, the sp_kill() command should not work; that's because the last line in a script never seems to run. However, if you pressed enter a few times so the last line in the script is blank, it would work again.