Adding a parameter to a function retuns Array

   582   0   0
User Avatar
Member
1 posts
Joined: Oct. 2016
Offline
function vector[] Fun(vector st){
     vector FunA () {
        vector a = st;;
        return a;
    }

    vector FunE () {
        vector e = set(1, 0, 0);
        return e;
    }
    vector positionArray[];
    positionArray[0]= set(FunA());
    positionArray[1]= set(FunE());
    return positionArray;
}

    vector s=set(0, 0, 0);
   
    printf("%d",Fun(s));
 

I am learning Vex and stuck with this code. I want to send different parameters to Fun() function an get different arrays. Error is “Variable is not accessible in this function” searched a lot but can not find a solution. Thank you.
  • Quick Links