## Subroutines and Functions

Naming conventions

Subroutine and Function names can contain she letters A to Z and a to z, the underscore “_” and digits 0 to 9. The only limitation is that subroutine and function names must begin with a letter, be no longer than 40 characters, and not be reserved words. For a list of reserved words, see the table of reserved words under "Functions, Statements, Reserved words – Quick Reference" topic in the "Scripting Language Overview" chapter.

Cypress Enable allows script developers to create their own functions or subroutines or to make DLL calls. Subroutines are created with the syntax "Sub <subname> .... End Sub". Functions are similar "Function <funcname> As <type> ... <funcname> = <value> ... End Function.” DLL functions are declared via the Declare statement.

Function Return Types

Note: Be aware that type Object is not a valid return type of functions.

More:

ByRef and ByVal