- This wiki is out of date, use the continuation of this wiki instead
Declare
From FenixWiki
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. By default, the returntype is an int.
Note that this functionality is only available in Fenix 0.89 and up. Also before version 0.93, defining the returntype as an int, the compiler would nag. This is worked around by removing the int statement.
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
