Passing and returning arrays

BlitzMax Forums/BlitzMax Programming/Passing and returning arrays

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

To pass an array:
function passAnArray(myArray:float[])
   local theSizeIWant:int = 3
   if myArray.length <> theSizeIWant then
        return 
   end if
end function


To return an array:
function returnArray:float[]()
   local retArray:float[3]
   return retArray
end function


of course float is just the datatype, can be whatever.