|
Sub
|
|
|
|
| name
|
|
|
| Name of the Sub. See standard variable naming conventions.
|
|
|
| arglist
|
|
|
| List of variables representing arguments that are passed to the Sub procedure when it is called. Multiple variables are separated by commas.
|
|
|
| statements
|
|
|
| Any group of statements to be executed within the body of the Sub procedure.
|
| You can declare variable type within varlist or you can specify only variable name.
|
| You can't define a Sub procedure inside any other procedure.
|
| You call a Sub procedure using the procedure name followed by the argument list.
|
| Sub declaration must precede Sub call.
|
| Code execution starts with the first line after the last procedure.
|
| Sub SomeSub (a as integer, b)
|
| print "a = ", a
|
| print "b = ", b
|
| End Sub
|
|
|
| ........
|
|
|
| SomeSub(a + b + c, 123)
|
|
|
| ........
|