User Tools

Site Tools


prototype_procedure_prototype_.htm
Navigation:  Templates > Template Language Reference > Complete Alpha Listing >====== #PROTOTYPE (procedure prototype) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

#PROTOTYPE( parameter list )

blk2blue.jpg

#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

prototype_procedure_prototype_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1