[Gambas-user] IDE: tabs

Jaap Cramer jaap_cramer at ...67...
Thu Apr 3 13:35:18 CEST 2008


Hello

Since I upgraded to 2.4 I discovered that a project sometimes opens all classes/forms/modules. Is it possible to stop this behaviour?

An other question I have, see it as a request :)
Is it possible to close a tab by pressing Ctrl-F4?

Jaap

----------------------------------------
> From: gambas at ...1...
> To: info at ...394...; gambas-user at lists.sourceforge.net
> Date: Thu, 3 Apr 2008 11:59:38 +0200
> Subject: Re: [Gambas-user] Returning  multiple values from a function
> 
> On jeudi 3 avril 2008, Rolf-Werner Eilert wrote:
>> Benoit Minisini schrieb:
>>> On jeudi 3 avril 2008, Rolf-Werner Eilert wrote:
>>>> This is just the way I do it. But when I have more than 2 values to
>>>> separate, I'll use another string[] to have them splitted (though I like
>>>> to use a Tab (chr$(9)). This runs incredibly fast in Gambas.
>>>>
>>>> Let's assume you receive a string like "10|cat|male|black" I would do
>>>>
>>>> dim partstring as new string[]
>>>>
>>>> partstring = split(sResult, "|")
>>>>
>>>> 'and now you can examine the part-strings:
>>>>
>>>> if val(partstring[0]) = 10 then...
>>>>
>>>> if partstring[1] = "cat" then...
>>>>
>>>> Rolf
>>>>
>>>> Jaap Cramer schrieb:
>>>>> When I need multiple returnvalues I use an array
>>>>> Mostly of the string[] type.
>>>>> When it contains different things, like an integer and a string, I put
>>>>> them in 1 string, and split them
>>>>>
>>>>> sResult = DoSomething()   ' call the function
>>>>> result is "10|cat"               ' i use a pipe to divide my string
>>>>>
>>>>> sInteger = val(left(sResult, instr(sResult, "|")-1))
>>>>> sString = mid(sResult, instr(sResult, "|")+1)
>>>>>
>>>>> I think this should work...
>>>>>
>>>>> ----------------------------------------
>>>>>
>>>>>> From: rterry at ...1822...
>>>>>> To: gambas-user at lists.sourceforge.net
>>>>>> Date: Thu, 3 Apr 2008 13:37:48 +1100
>>>>>> Subject: [Gambas-user] Returning  multiple values from a function
>>>>>>
>>>>>> 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
>>>
>>> I think the better is using an array of Variant, or better an anoynmous
>>> array:
>>>
>>> FUNCTION DoSomething(Name AS String) AS Array
>>>
>>>   DIM FirstResult AS ...
>>>   DIM SecondResult AS ...
>>>
>>>   ' Do something
>>>
>>>   RETURN [FirstResult, SecondResult]
>>>
>>> END
>>
>> Very interesting idea, but if I have more than a few result lines, how
>> could I spare me writing
>>
>> RETURN [FirstResult, SecondResult, ThirdResult, ForthResult ... ]
>>
>> Rolf
>>
> 
> [...] can take up to 63 elements.
> 
> -- 
> Benoit Minisini
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

_________________________________________________________________
De leukste online filmpjes vind je op MSN Video!
http://video.msn.com/video.aspx?mkt=nl-nl



More information about the User mailing list