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:
 
 
February 17th, 04:24 PM
dinkdead.gif
"Something I learnt from Seseler recently is that it's possible to get the value of DinkC's returnint directly as a variable named &return in 1.08 and later. This means that anything that retrieves a value that will then be used immediately won't need an intermediary var."

A trick I used extensively in Broken Windows.
It's very useful for short throwaway things, for example I wanted some text to show for 5 seconds:

// startmen.c
say_xy("Type!", 0, 280);
sp_kill(&return, 5000);
say_xy("Press escape to exit.", 0, 310);
sp_kill(&return, 5000);
say_xy("(Only letters, space, return, full stop and comma work)", 0, 340);
sp_kill(&return, 5000);


Though it may not always work. I don't know why. See the slightly incoherent comment at the start of solitar.c