Harbour (programming language): Difference between revisions

Content deleted Content added
m Copyedit changes for hyphen consistency.
m MOS:Slashes
Line 227:
Alternatively TRY [CATCH] [FINALLY] statements are available on ''xhb'' library working like the SEQUENCE construct.
 
===Procedures/ and Functions===
[STATIC] PROCEDURE ''SomeProcedureName''
[STATIC] PROCEDURE ''SomeProcedureName''()
Line 239:
[STATIC] FUNCTION ''SomeProcedureName''( ''Param1'' [, ''ParamsN''] )
 
[[Subroutine|Procedures]]/ and [[Function (computer science)|Functions]] in Harbour can be specified with the [[keyword (computer programming)|keyword]]s <code>PROCEDURE</code>, or <code>FUNCTION</code>. Naming rules are same as those for ''Variables'' (up to 63 characters non-case sensitive). Both Procedures and Functions may be qualified by the scope qualifier ''STATIC'' to restrict their usage to the scope of the module where defined.
 
The ''INIT'' or ''EXIT'' optional qualifiers, will flag the procedure to be automatically invoked just before calling the application startup procedure, or just after quitting the application, respectively. [[Parameter (computer science)|Parameter]]s passed to a procedure/function appear in the subroutine as local variables, and may accept any type, including references.