Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing array to mac - pointer issues
#1
Hi Gintaras,

if I pass an ARRAY(str) variable to a function, it works fine with receiving function written as 
function ARRAY(str)'arrTest
or 
function ARRAY(str)&arrTest

depending on whether I am returning any values back to the calling function.

However, if I call it as a mac using function ARRAY(str)'arrTest (because it can't wait for return), it says:

'parameters must be of intrinsic or pointer types.'

note, I am calling the mac as:

mac "RecevingFunc" "" arrTest

I have read the forum on this and this is one of the toughest areas of programming for me.
If just uni-dimensional array, I could just change it to string collection but harder if multi-dimensional.
Any pointers on how to do this? (that was a pun!)
Seriously, any help appreciated!
Thanks, S

Macro Macro10
Code:
Copy      Help
str strTestColl = "a[]b[]c[]d[]e[]f[]g"
ARRAY(str) arrTest = strTestColl
mac "ReceiveArrayAsMac" "" arrTest

Function ReceiveArrayAsMac
Code:
Copy      Help
function ARRAY(str)'arrTest

out F"arrTest.len: {arrTest.len}"
for _i 0 arrTest.len
,out F"{_i}: '{arrTest[_i]}'"


Messages In This Thread
Passing array to mac - pointer issues - by stupomer - 02-13-2019, 01:58 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)