|
Hi Paul, >>The prototype would be the same in all cases but the idea was to retrieve the name of the procedure from a >>application parameter as we do with dynamically called programs. Does this mean, you want to pass the "procedure" name as parameter from an other program and execute this procedure? If so, you have can pass the procedure pointer as parameter. But somewhere (in the preceeding procedures) the procedure pointer must be hard coded. Example: 1. Prototypes *-----------------* D CvtDate PR 10A ExtProc(MyProcPtr) D ParmDate D const options(*NoPass) D MyProcPtr S * ProcPtr D CvtDateProcPtr PR 10A D ParmProcPtr * ProcPtr 2. Procedure ************************************************************ * Convert Date using Procedure Pointers as parameters ************************************************************ P CvtDateProcPtr B Export D CvtDateProcPtr PI 10A D ParmProc * ProcPtr D ParmDate D const options(*NoPass) *----------------------------------------------------------- /Free MyProcPtr = ParmProc; If %Parms >= 2; Return CvtDate(ParmDate); else; Return CvtDate(); EndIf; /End-Free P CvtDateProcPtr E 3. Call Procedure *-----------------* /Free Select; When Country = 'DE'; MyProcPtr = %PAddr('CVTDATEUR'); When Country = 'USA'; MyProcPtr = ConstProcUSA; When Country = 'JPN'; MyProcPtr = ConstProcJIS; EndSL; MyCharDate = CvtDateProcPtr(MyProcPtr: MyDate); Dsply MyCharDate; /End-Free Birgitta Mit freundlichen Grüßen i.A. Birgitta Hauser LUNZER + PARTNER GMBH Unternehmensberatung Carl-Zeiss-Straße 1 63755 Alzenau Tel: + 49 6023 951-255 Fax: + 49 6023 951-111 Internet. www.lp-gmbh.com www.rpg-schulung.de
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.