Plex 2E

  • 1.  In Synon program, how can I pass a pointer as parameter?

    Posted Feb 01, 2018 02:15 PM

    I want to pass a pointer parameter in a Synon program which generates in RPG iV source code. Is there a way to do this in Synon?



  • 2.  Re: In Synon program, how can I pass a pointer as parameter?

    Posted Feb 10, 2018 05:21 PM

    CA 2E does not support Pointers as field types for declaring as function parameters.

     

    I do not have my AS400 turned on to look at this - but I think I did this in the past by converting the pointer to an integer (? not too sure what specific type) - then use that integer to declare the parameter.

     

    I'm assuming you are using some EXCUSRSRC that returns the Pointer and you need to pass that pointer across external functions.

     

    If you are using the Pointer just within a single external function - then just save it to some shared storage at the EXCUSRSRC level - ie. save the Pointer to a field called UPOINTER in one EXCUSRSRC - then in another EXCUSRSRC just reference UPOINTER. Only works if both EXCUSRSRC are in the same *EXTERNAL function.