- This wiki is out of date, use the continuation of this wiki instead
Begin
From FenixWiki
(Difference between revisions)
Revision as of 12:53, 24 July 2007 (edit) Sandman (Talk | contribs) ← Previous diff |
Revision as of 13:19, 24 July 2007 (edit) (undo) Sandman (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
[[category:reserved]] | [[category:reserved]] | ||
[[category:language]] | [[category:language]] | ||
+ | [[category:basic statement]] | ||
== Definition == | == Definition == | ||
Line 9: | Line 10: | ||
'''End''' | '''End''' | ||
- | Begin is a reserved word to indicate the start of the code part of a [[program]] | + | 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]]. |
== Example == | == Example == | ||
<pre> | <pre> | ||
Program 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 main process | ||
- | End | ||
Begin // Start the main code part of the main process | Begin // Start the main code part of the main process | ||
proc1(); // create new instance of proc1 | proc1(); // create new instance of proc1 | ||
Line 27: | Line 20: | ||
frame; | frame; | ||
End | End | ||
- | OnExit // Start the exit code part of the main process | ||
- | 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 | End | ||
Process proc1() | Process proc1() | ||
- | Public // Start the public variables part of the process | ||
- | Private // Start the private variables part of the process | ||
Begin // Start the main code part of the process | Begin // Start the main code part of the process | ||
Loop | Loop | ||
frame; | frame; | ||
End | End | ||
- | + | End | |
+ | |||
+ | Function int func1() | ||
+ | Begin // Start the main code part of the function | ||
+ | return 0; | ||
End | End | ||
</pre> | </pre> | ||
- | Used in example: [[loop]], [[end]], [[ | + | Used in example: [[loop]], [[end]], [[program]], [[process]], [[function]] |
- | + | ||
- | + | ||
- | + | ||
- | + |
Revision as of 13:19, 24 July 2007
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.
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