#PROTOTYPE (procedure prototype) 

Top  Previous  Next

 

#PROTOTYPE( parameter list )

#PROTOTYPE

Assigns the parameter list to the Prototype entry field.

parameter list

A string constant containing the procedure's prototype parameter list (the entire procedure prototype without the leading procedure name) for the application's MAP structure (see the discussion of Procedure Prototypes in the Language Reference).

The #PROTOTYPE statement assigns the parameter list to the Prototype entry field on the Application Generator's Procedure Properties window, which automatically "dims out" the field (the programmer may not override this Prototype). This allows you to create procedure Templates which require a specific parameter list without forcing the programmer to know the procedure's prototype.

The #PROTOTYPE statement is valid only within a #PROCEDURE section and only one is allowed per #PROCEDURE section. If there is no #PROTOTYPE statement in the #PROCEDURE, the programmer is allowed to change it.

Example:

#PROCEDURE(SomeProc,'Some Procedure Template')

%Procedure PROCEDURE(Parm1,Parm2,Parm3)

#PROTOTYPE('(STRING,*LONG,<*SHORT>)')

        #!This procedure expects three parameters:

        #!  a STRING passed by value

        #!  a LONG passed by address

        #!  a SHORT passed by address which may be omitted

 

#PROCEDURE(SomeFunc,'Some Template Procedure')

%Procedure PROCEDURE(Parm1,Parm2,Parm3)

#PROTOTYPE('(STRING,*LONG,<*SHORT>),STRING')

        #!This procedure expects three parameters:

        #!  a STRING passed by value

        #!  a LONG passed by address

        #!  a SHORT passed by address which may be omitted

        #!It returns a STRING