[Gambas-user] Returning  multiple values from a function
    richard terry 
    rterry at ...1822...
       
    Thu Apr  3 04:37:48 CEST 2008
    
    
  
Hope this is not too ambiguous or dumb:
Is it possible to return more than 1 value from a function?
This works:
function  DoSomething(name as string) as integer[]
 Dim numbers as integer[2]
'do whatever in here
numbers[0]=10
numbers[1] = 20
return numbers
however seems a bit clumbsy
doing this:
function  Dosomething(name as string) as integer,string
REturn   10,"cat"
Dosn't
Probably a stupid question. I guess if you want back non identical types 
one would just use a variant array?
thanks
Richard
    
    
More information about the User
mailing list