This wiki is out of date, use the continuation of this wiki instead

Declare

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:26, 12 May 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 15:26, 12 May 2007 (edit) (undo)
Sandman (Talk | contribs)
m (Definition)
Next diff →
Line 2: Line 2:
== Definition == == Definition ==
-'''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.

Revision as of 15:26, 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.

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
Personal tools