Skip to content

Register_Procedure

See Also: Procedure, Register_Function, Send

Purpose

To allow a procedure to be referred to in a part of the program that precedes the point at which the procedure is defined.

Syntax

Register_Procedure {message} [{type} {param}]
Register_Procedure Set {message} [{type} {param}]

What It Does

The message is the name of the message that is forward referenced. Since the point of the Register_Procedure command is to predefine messages, message should not already be defined when this command is used.

{type} is used with each parameter passed to the procedure to define its data type. Valid data types are integer, number, date, real, and string.

The name of the parameter may be anything that describes the use of the value in the procedure. {param} may not be a reserved word and must follow the typical symbol rules.

Register_Procedure AddName String sName String sAddress String sPhone

Properties have two access methods: a get property-name and a set property-name message. The set property-name can be registered using the Register_Procedure command. The get property-name can be registered using the Register_Function command.

Register_Procedure Set piHitCount integer iCount
Register_Function      piHitCount returns integer

Use of this command is optional. Procedure and Procedure Set messages do not need to be registered before they are used in a program. This is not the case for functions, which must be registered (or defined) before they can be used in an expression.

Global methods (procedures, procedure sets, and functions) may not be registered.