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

Begin

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:41, 1 May 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 21:41, 1 May 2007 (edit) (undo)
Sandman (Talk | contribs)
m (Block moved to Begin)
Next diff →

Revision as of 21:41, 1 May 2007


Definition

Begin

Begin is a reserved word to indicate the start of the code part of a program or a process. The end is indicated by End.

Example

Program example;
Global // Start a global variables part of the program
End
Const // Start a constants part of the program
End
Local // Start a global variables part of the program
End
Private // Start a private variables part of the program
End
Begin // Start the code part of the program
    proc1(); // create new instance of proc1
    Loop
        frame;
    End
End

Global // Start a global variables part of the program
End
Const // Start a constants part of the program
End
Local // Start a global variables part of the program
End
Private // Start a private variables part of the program
End

Process proc1()
Private // Start the private variables part of the process
End
Begin // Start the code part of the process
    Loop
        frame;
    End
End

Used in example: loop, end, process

Global, constant, local and private parts of the program can be scattered through the code, between processes and functions. Sometimes the End can be left out, but it's good practice to keep it in. When a variable or constant is declared, it's only viewable or editable for statements beneath the declaration. For more info on that, see prototyping.

Personal tools