# Return an array of num from a function

**URL:** <https://tech-community.robotics.abb.com/t/return-an-array-of-num-from-a-function/5978>\
**Category:** Robot Controller\
**Created:** [February 20, 2014, 3:36pm UTC](https://tech-community.robotics.abb.com/t/return-an-array-of-num-from-a-function/5978 "2014-02-20T15:36:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErikHagman](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ErikHagman](https://tech-community.robotics.abb.com/u/ErikHagman)\
**Post date:** [February 20, 2014, 3:36pm UTC](https://tech-community.robotics.abb.com/t/return-an-array-of-num-from-a-function/5978/1 "2014-02-20T15:36:21Z")

</div>

Hi!

I try to make a function that receive an array of num and then return an array, but i can not get it to work.  
Is it possible to return an array from a function??

FUNC num{_} ArrayOrganizer(num Array{_})

! some boring stuff

RETURN Array{\*};  
ENDFUNC

---

<div class="post-metadata">

**Author:** ![Micky](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Micky](https://tech-community.robotics.abb.com/u/Micky)\
**Post date:** [February 21, 2014, 10:54am UTC](https://tech-community.robotics.abb.com/t/return-an-array-of-num-from-a-function/5978/2 "2014-02-21T10:54:51Z")

</div>

Hi,

as i know you can not create a function which returns an array.

But you can create a procedure which returns the modified Array.

**Example:**

PROC ArrayOrganizer(num Array1{_}, INOUT num Array2{_})

Array2 :=Array1;

endproc

Routine call: ArrayOrganizer arr1,arr2;

arr1 is the original array and arr2 is the modfied array.

/BR

Micky

---

<div class="post-metadata">

**Author:** ![ErikHagman](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ErikHagman](https://tech-community.robotics.abb.com/u/ErikHagman)\
**Post date:** [February 21, 2014, 12:04pm UTC](https://tech-community.robotics.abb.com/t/return-an-array-of-num-from-a-function/5978/3 "2014-02-21T12:04:46Z")

</div>

Sad to hear that, but no big problem, will have to try something else 🙂
