Difference between revisions of "Call"
From Unofficial QEdit Wiki Guide
Line 9: | Line 9: | ||
==Example== | ==Example== | ||
<span style='font-size:12px;font-family:courier'> | <span style='font-size:12px;font-family:courier'> | ||
− | <span style='color:blue'>100: </span><span style='color:green'>call </span>101 <span style='color:orange'> | + | <span style='color:blue'>100: </span><span style='color:green'>call </span>101 <span style='color:orange'>//Call function 101</span> |
<span style='color:green'> window_msg </span>'Okay. I've waited 1 second. Now what?' | <span style='color:green'> window_msg </span>'Okay. I've waited 1 second. Now what?' | ||
<span style='color:green'> winend </span> | <span style='color:green'> winend </span> | ||
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
− | <span style='color:blue'>101: </span><span style='color:green'>call </span>102 <span style='color:orange'> | + | <span style='color:blue'>101: </span><span style='color:green'>call </span>102 <span style='color:orange'>//Call function 102</span> |
− | <span style='color:green'> call </span>102 <span style='color:orange'> | + | <span style='color:green'> call </span>102 <span style='color:orange'>//Call function 102</span> |
− | <span style='color:green'> call </span>102 <span style='color:orange'> | + | <span style='color:green'> call </span>102 <span style='color:orange'>//Call function 102</span> |
− | <span style='color:green'> call </span>102 <span style='color:orange'> | + | <span style='color:green'> call </span>102 <span style='color:orange'>//Call function 102</span> |
− | <span style='color:green'> call </span>102 <span style='color:orange'> | + | <span style='color:green'> call </span>102 <span style='color:orange'>//Call function 102</span> |
− | <span style='color:green'> call </span>102 <span style='color:orange'> | + | <span style='color:green'> call </span>102 <span style='color:orange'>//Call function 102</span> |
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
− | <span style='color:blue'>102: </span><span style='color:green'>sync </span><span style='color:orange'> | + | <span style='color:blue'>102: </span><span style='color:green'>sync </span><span style='color:orange'>//Pause for 1 frame</span> |
− | <span style='color:green'> sync </span><span style='color:orange'> | + | <span style='color:green'> sync </span><span style='color:orange'>//Pause for 1 frame</span> |
− | <span style='color:green'> sync </span><span style='color:orange'> | + | <span style='color:green'> sync </span><span style='color:orange'>//Pause for 1 frame</span> |
− | <span style='color:green'> sync </span><span style='color:orange'> | + | <span style='color:green'> sync </span><span style='color:orange'>//Pause for 1 frame</span> |
− | <span style='color:green'> sync </span><span style='color:orange'> | + | <span style='color:green'> sync </span><span style='color:orange'>//Pause for 1 frame</span> |
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
</span> | </span> |
Revision as of 12:01, 25 March 2011
Syntax
Syntax: call Function
- Function = Function number to call up
Use
Used to call a function and then return to the function that called it.
Example
100: call 101 //Call function 101
window_msg 'Okay. I've waited 1 second. Now what?'
winend
ret
101: call 102 //Call function 102
call 102 //Call function 102
call 102 //Call function 102
call 102 //Call function 102
call 102 //Call function 102
call 102 //Call function 102
ret
102: sync //Pause for 1 frame
sync //Pause for 1 frame
sync //Pause for 1 frame
sync //Pause for 1 frame
sync //Pause for 1 frame
ret
Related
ret, sync, window_msg, winend