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 15:34, 1 May 2007 (edit)
FCR (Talk | contribs)

← Previous diff
Current revision (13:31, 24 July 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
(7 intermediate revisions not shown.)
Line 1: Line 1:
[[category:reserved]] [[category:reserved]]
 +[[category:language]]
 +[[category:basic statement]]
 +
 +[[Basic statements|'''Up to Basic Statements''']]
 +----
 +
 +
== Definition == == Definition ==
-'''Begin'''+'''Begin'''<br>
 +<main code><br>
 +['''OnExit'''<br>
 +<exit code>]<br>
 +'''End'''
-Begin is a reserved word to begin a program block. it can contain statements and is mostly the block of code that belongs to a [[process]] or the [[main_program|main program code]].+Begin is a reserved word to indicate the start of the code part of a [[program]], [[process]] or [[function]]. The end is indicated by [[End]]. The [[OnExit]] statement can be used in between.
== Example == == Example ==
<pre> <pre>
-Program test()+Program example;
-Begin+Begin // Start the main code part of the main process
proc1(); // create new instance of proc1 proc1(); // create new instance of proc1
 + Loop
 + frame;
 + End
End End
-process proc1()+Process proc1()
-begin+Begin // Start the main code part of the process
 + Loop
 + frame;
 + End
 +End
-end+Function int func1()
 +Begin // Start the main code part of the function
 + return 0;
 +End
</pre> </pre>
 +Used in example: [[loop]], [[end]], [[program]], [[process]], [[function]]

Current revision

Up to Basic Statements



[edit] Definition

Begin
<main code>
[OnExit
<exit code>]
End

Begin is a reserved word to indicate the start of the code part of a program, process or function. The end is indicated by End. The OnExit statement can be used in between.

[edit] Example

Program example;
Begin // Start the main code part of the main process
    proc1(); // create new instance of proc1
    Loop
        frame;
    End
End

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

Function int func1()
Begin // Start the main code part of the function
    return 0;
End

Used in example: loop, end, program, process, function

Personal tools