ArcBasicDocs

Function

Declares your own command.

Function Name[%|#|$|.Type]([parameter[=default], ...]) ... End Function

Parameters

None.

Description

Defines a function: a named block of lines that can be called from anywhere, with values passed in, and that can give back a result with Return. The name's ending says what it gives back: % (or nothing) a whole number, # a decimal number, $ text, or .TypeName an object. Parameters can have defaults, which make them optional. Variables made inside it are Local.

Example

Function.abs
Function Area#(width#, height# = 1)    Return width * heightEnd Function

See also