Re: Pass by address

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Thu, 17 Aug 2000, you wrote:
> Ouch!  That C++ code hurts smile
>
> On the pass by address thread...
>
> Maybe I'm being simplistic here (and I'm all for the easy life - it's why I
> like Euphoria so much) but am I hitting the nail on the head re: pass by
> address when I say:
>
> "The problem is that a function can take multiple arguments but can only
> return one value?"
>
> If we had a function that could return multiple values would we then not
> need pass by address?  Something like:
>
 snippit

>
> [x , y] = experiment(x, y)
>

I certainly agree that it would add some balance, perhaps even elegance, to
Euphoria if you could specify a "list" of targets which accept a function
return.  However, the idea that a function can only return one value is
misleading. I routinely wriite functions which return anywhere from 2 to 100 or
more "values". e.g. pass the function "age_account" a sequence containing
a customer record (name, address.... 30,60,90 day balances, current
transactions) and return an  updated record with balances adjusted.

Regards,
Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu