Stored procedures may begin with the Compile statement which serves to
- identify the stored procedure as a function or subroutine;
- identify the stored procedure’s name;
- declare the arguments passed to the stored procedure, providing the argument names and data types.
An example of a Compile statement is:
Compile Function COUNT_INVOICES(Integer inv_count)
Argument names have the same rules as stored procedure names. You may pass in as many as 256 arguments. Rules for stored procedure and argument names are as follows:
- begin with an alpha character;
- do not use spaces or periods;
- limit names to 50 characters or less.