Home > lang > sub 
 en fr de es it nl pl pt pt_BR mk sq ca cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
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

[ 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