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

Function

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:13, 1 May 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Revision as of 21:34, 7 May 2007 (edit) (undo)
84.82.73.239 (Talk)
(Example)
Next diff →
Line 24: Line 24:
</pre> </pre>
addInts(3,6); will return 9. One can see that the function does indeed: addInts(3,6); will return 9. One can see that the function does indeed:
-*receives parameters+*receive parameters.
-*acts on the parameters+*act on the parameters.
-*returns a value+*return a value.

Revision as of 21:34, 7 May 2007


Definition

A function is a subroutine to which one or more of the following apply:

A function does not create a new thread, and therefore the process which called the function waits until the function is completed before continuing executing its code.

As opposed to a process, a function doesn't have a frame; statement. See process for more information.

For a list of functions, see this list of functions.

Example

int addInts( int a , int b )
Begin
    return a+b;
End

addInts(3,6); will return 9. One can see that the function does indeed:

  • receive parameters.
  • act on the parameters.
  • return a value.
Personal tools