About functions

Microsoft Office ShapeSheet

About functions

A function performs a single well-defined task. Most functions take a number of arguments as input. Although the type and number of arguments depend on the function, all functions have the same general syntax:

FUNCTION(argument1, argument2, …argumentN [, argumentA | argumentB])

Syntax element

Description

()

If a function takes no arguments, it must be followed by an empty set of parentheses ().

,

Arguments are separated by a comma.

Used for notation only; do not include in a function.

[]

Optional argument. Used for notation only; do not include in a function.

|

A choice; you can include argumentA or argumentB. Used for notation only; do not include in a function.

Many functions that you can use in formulas resemble those you've seen in spreadsheet programs: mathematical, such as SUM or SQRT; trigonometric, such as SIN or COS; or logical, such as IF or NOT. Many other functions are unique to Microsoft Visio, such as GUARD, GRAVITY, and RUNADDON.

For more information on specific functions, see the ShapeSheet Reference in this Developer Reference.

Note Certain functions appear in formulas generated by Microsoft Visio, but are not listed in the Insert Function dialog box or described in this Developer Reference because they are reserved for internal use and should not be used in other formulas. Here are examples: ELLIPSE_THETA, _ELLIPSE_ECC, _UCON_C1, and _SHAPEMIN.