Re: [Gambas-user] Recursion does not work

2010-01-21 Thread Demosthenes Koptsis
Tank u so much!!! it finally works! 2010/1/21 Benoît Minisini > > 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()

Re: [Gambas-user] Recursion does not work

2010-01-21 Thread Matteo Pasotti
Hi, try adding parentheses to Copy sArray.Copy() -- Matteo Demosthenes Koptsis ha scritto: > 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_

Re: [Gambas-user] Recursion does not work

2010-01-21 Thread Benoît Minisini
> 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 > > bu

Re: [Gambas-user] Recursion does not work

2010-01-21 Thread Demosthenes Koptsis
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, wa

Re: [Gambas-user] Recursion does not work

2010-01-21 Thread Benoît Minisini
> i found that > > Also, the contents of object > datatypes (array types, > collections, objects) are always passed by reference > in both languages! > from http://gambasdoc.org/help/doc/diffvb?view > > i think this is the problem! > > How to pass an Ar

Re: [Gambas-user] Recursion does not work

2010-01-21 Thread Demosthenes Koptsis
i found that Also, the contents of object datatypes (array types, collections, objects) are always passed by reference in both languages! from http://gambasdoc.org/help/doc/diffvb?view i think this is the problem! How to pass an Array byval in a functio

[Gambas-user] Recursion does not work

2010-01-21 Thread Demosthenes Koptsis
Hi, i use ubuntu 9.10 and Gambas 2.13 i create an anagram application port from phpAG http://phpag.sourceforge.net/ i completed the same app with VB5 and now i make it also in Gmabas To make anagrams i use recursion i face up with a problem of recursion. i call anag() function from PUBLIC SUB