Re: Pass by Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcuny said...

I'm writing an application that has multiple digital filters. Calling the filter:

  • Calculates a filtered result, and
  • Updates the filter's history.

That is, two different things are being modified here - there's a result returned from the function call, and as a side-effect, a data structure gets updated.

<snip>

But it raises the question: why do I have to jump through these hoops at all? Why can't OpenEuphoria let me pass values by reference like just about any other language?

- David

As I recall, eumem was written explicitly for this use case.

Maps (called dictionaries by Python iirc) use eumem internally precisely for this reason - they need to emulate PBR.

See http://openeuphoria.org/docs/std_eumem.html#_5543_ram_space for details...

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

Search



Quick Links

User menu

Not signed in.

Misc Menu