ARRAYS AND FUNPROG

Hi everyone, I get stuck in a problem due to not knowing how to return an array from a Funprog

I mean, I'd like to know if it is possible how to return an array from a Funprog

Something like: 

######################################################################## 

Funprog YFUNC()

Local Char  YOUTPUT(200)(20)

    While i < 20

          YOUTPUT( i ) = "HELLO!" 

           i += 1

    Wend

End YOUTPUT

########################################################################

Local Char YYY(200)(20)

YYY = func YFUNC()

  • 0

    Good day, funprog does not return a array value, its a single value normal used to indicate a status or operational indicator of the execution of the code in the funprog. What you would do if you are using a funprog which needs to update/return an array would be to pass the value through to the funprog as a parameter:

    Funprog YFUNC(YOUTPUT)

    Variable Char  YOUTPUT()(0..)

        While i < 20

              YOUTPUT( i ) = "HELLO!" 

               i += 1

        Wend

    End ""