pass by ref

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

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() 
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu