- This wiki is out of date, use the continuation of this wiki instead
Declare
From FenixWiki
(Difference between revisions)
Revision as of 15:31, 12 May 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Revision as of 15:31, 12 May 2007 (edit) (undo) Sandman (Talk | contribs) m Next diff → |
||
Line 4: | Line 4: | ||
'''Declare''' [Function|Process] [<returntype>] <name>([<parameters>]) | '''Declare''' [Function|Process] [<returntype>] <name>([<parameters>]) | ||
- | Declare is a reserved word used to declare a process or function before its actual code. This can be useful if the function needs to be known before the function is actually defined. | + | Declare is a reserved word used to declare a [[process]] or [[function]] before its actual code. This can be useful if the function needs to be known before the function is actually defined. |
Note that this functionality is only available in [[Fenix]] [[0.89]] and up. | Note that this functionality is only available in [[Fenix]] [[0.89]] and up. |
Revision as of 15:31, 12 May 2007
Definition
Declare [Function|Process] [<returntype>] <name>([<parameters>])
Declare is a reserved word used to declare a process or function before its actual code. This can be useful if the function needs to be known before the function is actually defined.
Note that this functionality is only available in Fenix 0.89 and up.
Example
Declare Process example_process() Public // Declare public variables for the process example_process int public_int; string public_string; End // This End is optional Private // Declare private variables for the process example_process int private_int; End End Declare Function string example_function( int param_int) Private // Declare private variables for the process example_process int private_int; End End Process example_process(); /* The Declare handles this section. Public int public_int; string public_string; Private int private_int; */ Begin Loop frame; End End Function string example_function( int param_int) Begin return ""; End