Editing Performance
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 35: | Line 35: | ||
When passing variables to a function, Octave will only make a copy of it is going to be modified. That is, unless the argument needs to be changed, the variable will be like a reference and take no extra memory or time to write. | When passing variables to a function, Octave will only make a copy of it is going to be modified. That is, unless the argument needs to be changed, the variable will be like a reference and take no extra memory or time to write. | ||
{{Code|Looking at lazy copying|<syntaxhighlight lang=" | {{Code|Looking at lazy copying|<syntaxhighlight lang="matlab" style="font-size:13px"> | ||
function read_arg (arg) | function read_arg (arg) | ||
x = arg(1); | x = arg(1); |