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

Return

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:56, 24 April 2008 (edit)
Sandman (Talk | contribs)
(New page: Category:reserved Category:language Category:Basic statement == Definition == '''Return''' [<value>]; Return is a reserved word used to return a value in a function. The retu...)
← Previous diff
Current revision (11:04, 24 April 2008) (edit) (undo)
Sandman (Talk | contribs)
m
 
Line 18: Line 18:
End End
</pre> </pre>
 +Used in example: [[Function]], [[Private]], [[Begin]], [[End]], [[Return]], [[String]]

Current revision


[edit] Definition

Return [<value>];

Return is a reserved word used to return a value in a function. The returned value must be of the datatype specified as the returndatatype (see Function). By default, the returntype of a process or function is an int. When this statement is reached, the function in which it resides will stop execution and return the specified value. If a value was not specified, the ProcessID will be returned.

[edit] Example

Function string example_function()
Private
    string s;
Begin
    s = "Some string;
    return s;
End

Used in example: Function, Private, Begin, End, Return, String

Personal tools