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: Stéphane Pinel <s dot pinel at equinoxpartners dot fr>
Date: Sun, 28 Jul 2002 18:25:20 +0200
Le 27/07/02 19:18, « Nathan Fisher » <virtual1 at pitnet dot net> a écrit :

> 
> 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
> 

Why not something like :

Sub GetServerInfos(Server as String, Address as String, Port As Integer)
....where :
Server is ->String
Address is String<-
Port is Integer<-

?

-- 
Stéphane Pinel
Equinox Partners France
Information System



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