====== Subroutines and Functions ====== ^Command^Description^ |[[call|Call statement]]|Branches to an external subroutine. Call returns to the next statement, after the external subroutine executes a Return.| |[[declare|Declare statement]]|Directs the compiler to recognize a call to a user-defined function or subroutine. Undeclared functions or subroutines will cause the compiler to abort.| |[[function_statement|Function statement]]|Establishes a procedure as a user-defined function so that it can return a value.| |[[gosub|GoSub statement]]|Branches to local subroutine. Returns to the following statement, when the subroutine terminates with a Return statement.| |[[return|Return statement]]|Branches back to calling statement + 1. If used from a function, Return can pass a value back to the calling stored procedure or event handler.| |[[subroutine|Subroutine statement]]|Establishes a procedure as a callable external subroutine.|