Difference between revisions of "AGIWiki/call"
< AGIWiki
Jump to navigation
Jump to search
m |
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
== Example == | == Example == | ||
< | <syntaxhighlight lang="cpp"> | ||
//typical error handler | //typical error handler | ||
Line 24: | Line 24: | ||
} | } | ||
</ | </syntaxhighlight> | ||
== Technical Information == | == Technical Information == | ||
Latest revision as of 15:16, 25 October 2018
Control Flow Commands |
The call command executes a logic script.
Syntax
- call(byt A);
Remarks
The logic with resource number A is executed one time. If it is not loaded before being called, it is loaded, then executed, then unloaded after returning.
A script entry is not made for logics that are loaded/unloaded in support of the call.v command.
If a logic is likely to be called more than once or twice, it is better to load it using the load.logics command. This avoids having the interpreter continually load and unload the same logic over and over.
Example
//typical error handler
if (error_code > 0) {
call(98);
}
Technical Information
Required interpreter version | Available in all AGI versions |
Bytecode value | 22 (0x16 hex) |
See also
Sources
- AGIwiki help file