Home > lang > sub 
 fr de es it nl pl pt pt_BR mk sq ca hu tr ar fa vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
SUB
This keyword is used for introducing a procedure declaration.

It is a synonymous for PROCEDURE.

[ STATIC ] { PUBLIC | PRIVATE } { PROCEDURE | SUB }
  Identifier
  (
    [ Parameter AS Datatype [ , ... ] ] [ , ]
    [ OPTIONAL Optional Parameter AS Datatype [ , ... ] ] [ , ] [ ... ]
  )
  ...
END

 3.0 
[ STATIC ] { PUBLIC | PRIVATE } { PROCEDURE | SUB }
  Identifier
  (
    [ [ BYREF ] Parameter AS Datatype [ , ... ] ] [ , ]
    [ OPTIONAL [ BYREF ] Optional Parameter AS Datatype [ , ... ] ] [ , ] [ ... ]
  )
  ...
END

This declares a procedure, i.e. a method that returns nothing. To return a value, use FUNCTION

The END keyword indicates the end of the procedure.

See also

Method Declaration