When you pass a single dimension array to a function, it is OK.
Now i intend to code a function dealing with a multi dimension one.
dim pilcarmar(18)
dim tascarmar(18,2)
.
.
.
call splitpile(pilcarmar,tascarmar)
.
.
.
def splitpile(pilori(),pilspl())
end def
I receive the error message : Wrong number of arguments using array "PILSPL"
Is it even correct to deal with a multi dimension array parameter ?
confused passing array to a function
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: confused passing array to a function
You should indicate in the parameter-list of the function definition that it refers to a two-dimensional array.
So def splitpile(pilori(),pilspl(,)) instead of def splitpile(pilori(),pilspl())
So NOT '()', but '(,)'
So def splitpile(pilori(),pilspl(,)) instead of def splitpile(pilori(),pilspl())
So NOT '()', but '(,)'
Re: confused passing array to a function
Okay thank you