[Gambas-user] Recursion does not work

Benoît Minisini gambas at ...1...
Thu Jan 21 17:07:39 CET 2010


> if i understood well i did this
> 
> declare Function as
> 
> PRIVATE FUNCTION anag(iStart AS Integer, iLen AS Integer, sArray AS
> String[]) 'vars are ByVal by default
> 
> and from
> 
> PUBLIC SUB Button1_Click()
> ...
>  anag(0, iLen, sArray.Copy)            'Make anagrams
> ....
> END
> 
> but i get error "Type mismatch, wanted String[], get Function instead"
> 
> how to copy array?
> 

sArray.Copy()

Parentheses are mandatory if you call a function (not when calling a 
procedure).

Regards,

-- 
Benoît Minisini




More information about the User mailing list