pass by ref
- Posted by xecronix Sep 02, 2015
- 2494 views
Is there a way in Euphoria to pass by ref?
#!/usr/bin/env eui enum FNAME sequence dude = {FNAME} public function fname(sequence self, sequence x) self[FNAME] = x return self[FNAME] end function sequence pbv_test = fname(dude, "Barney") printf(1, "pbv_test = %s\n", {pbv_test}) printf(1, "dude[FNAME] = %s\n", {dude[FNAME]}) -- dude must have been passed by value to fname()