Tuesday, May 3, 2011

Procedure pointers in RPGLE (PROCPTR)

Can anyone provide any interesting usage examples of these?

From stackoverflow
  • jjujuma,

    For a trivial example you could use this to implement some Object Oriented style procedure like Draw. You'd call a Circle_Draw procedure for a Circle or a Square_Draw procedure for a Square by assigning the appropriate %PADDR of the Circle_Draw or Square_Draw to your Draw procedure pointer. When calling the Draw procedure pointer you hide which procedure (Circle_Draw or Square_Draw) you're calling.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.