realbasic-betas.mbox
[Top] [All Lists]

Re: Ability to have more then one Return Value

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: Re: Ability to have more then one Return Value
From: Emile Schwarz <emile dot schwarz at wanadoo dot fr>
Date: Mon, 29 Jul 2002 07:08:24 +0200
Hi all,


I do not like to say ?me too?, but in this case:

Me too: I do not saw what is the problem (even if Nathan?s example is clear and 
I understand it).


But, since we have a comment from Mars Saxman *, I prefer to see REAL Software 
removing more bugs (which bugs ?) and improving
actual REALbasic features (just like the brand new Vector stuff), etc. (I do 
not want to add a new thread on some already discussed
features, so I do not add other features I want to be improved).


Emile


* Mars Saxman previous answer:
>It's certainly possible, but it would be a good bit of work. It doesn't
>break the syntax, but it's a radical change in semantics.


>Subject: Re: Ability to have more then one Return Value
>From: "Charles Yeomans" <yeomans at desuetude dot com>
>Date: Sat, 27 Jul 2002 13:55:42 -0400

I'm not so sure that I like this.  For this example, I think that it 
would make more sense to have a Server object with address and port 
properties.

Charles Yeomans

On Saturday, July 27, 2002, at 01:18  PM, Nathan Fisher wrote:

>
> On a somewhat similar note, it would be nice for functions to be able 
> to return more than one value.  This would require a bit of a change to 
> the compiler's syntax, but would eliminate the need for "wrapper 
> classes" in a lot of instances.
>
> For example, right now I might call GetAddressAndPort(Server) to get 
> the server's address and port.  As it is now, I would probably have to 
> return it as a single string, like "192.168.1.15:110" and nthfield out 
> the results.  This would be so much handier:
>
>      Sub GetAddressAndPort(Server as string) as string,integer
> or
>      Sub GetAddressAndPort(Server as string) as string, as integer
>
> and call it like
>
>      Address, Port=GetAddressAndPort(Server)
>
> Does something like this have a prayer of being implemented?  As far as 
> I can tell, it doesn't break existing syntax.



<Prev in Thread] Current Thread [Next in Thread>