RefProc
See Also: RefClass, RefFunc, RefProcSet, RefTable
Purpose
Allows referencing a procedure name in an undecorated manner.
Return Type
Syntax
(RefProc({ProcedureName}))
What it Does
In versions of DataFlex prior to 15.1, there were certain places where procedure names had to be referenced using a decorated name, by prepending msg_ to the procedure name. Using RefProc allows developers to use undecorated procedure names.
This makes referencing procedure names in such instances more intuitive, as developers no longer need to know the special decorated naming convention and when to use it. The use of RefProc also allows for full CodeSense support in the Studio.
Example
For example, to specify a procedure to use for database save confirmation, you would have to use code like this:
Procedure CustomExit
End_Procedure
Set Exit_msg to msg_CustomExit
Now, you can do this instead:
Procedure CustomExit
End_Procedure
Set Exit_msg to (RefProc(CustomExit))
Notes
RefProccan only be evaluated at compile time.RefProccannot be used to reference messages that return values. The examples below are cases where the existingget_andmsg_methodology must still be used:
Forward Get msg_ProcedureName {parameters} to Variable
Get msg_ProcedureName {parameters} to Variable