Difference between revisions of "Procedure"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
A '''procedure''' is a declaration of a [[routine]] which may be invoked from within the [[unit]] that declares it, from outside the unit if the procedure is public, or from within a [[program]], and the routine does not return a value as part of its definition.  A procedure that does return a value as part of its definition is a ''[[function]]''.  A procedure that is part of an object is called a [[method]].  A function that is part of an object is also a [[method]] if it cannot be assigned a value from outside of the function, and is a [[property]] if it can be assigned a value from outside of the function.
 
A '''procedure''' is a declaration of a [[routine]] which may be invoked from within the [[unit]] that declares it, from outside the unit if the procedure is public, or from within a [[program]], and the routine does not return a value as part of its definition.  A procedure that does return a value as part of its definition is a ''[[function]]''.  A procedure that is part of an object is called a [[method]].  A function that is part of an object is also a [[method]] if it cannot be assigned a value from outside of the function, and is a [[property]] if it can be assigned a value from outside of the function.
 +
 +
{{stub}}

Revision as of 19:40, 10 May 2006

A procedure is a declaration of a routine which may be invoked from within the unit that declares it, from outside the unit if the procedure is public, or from within a program, and the routine does not return a value as part of its definition. A procedure that does return a value as part of its definition is a function. A procedure that is part of an object is called a method. A function that is part of an object is also a method if it cannot be assigned a value from outside of the function, and is a property if it can be assigned a value from outside of the function.

An editor has declared this article to be a stub, meaning that it needs more information. Can you help out and add some? If you have some useful information, you can help the Free Pascal Wiki by clicking on the edit box on the left and expanding this page.