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