Misplaced Pages

Call-by-value-result: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactivelyNext edit →Content deleted Content addedVisualWikitext
Revision as of 12:57, 13 October 2004 edit137.111.13.34 (talk)No edit summary  Revision as of 14:29, 13 October 2004 edit undoCharles Matthews (talk | contribs)Autopatrolled, Administrators360,392 editsm copy editNext edit →
Line 1: Line 1:
An argument passing convention where the actual argument is a variable V whose value is copied to a local variable L inside the called function or procedure. If the procedure modifies L, these changes will not affect V, which may also be in scope inside the procedure, until the procedure returns when the final value of L is copied to V. Under call-by-reference changes to L would affect V immediately. Used, for example, by ] on the ]. In ], '''call-by-value-result''' is an ] in ], where the actual argument is a ] ''V'' whose value is copied to a ] ''L'' inside the called ] or ].
If the procedure modifies ''L'', these changes will not affect ''V'', which may also be in scope inside the ], until the procedure returns, when the final value of ''L'' is copied to ''V''. Under ], changes to ''L'' would affect ''V'' immediately.
Used, for example, by ] on the ].


{{FOLDOC}} {{FOLDOC}}

Revision as of 14:29, 13 October 2004

In computer science, call-by-value-result is an argument passing convention in operational semantics, where the actual argument is a variable V whose value is copied to a local variable L inside the called function or procedure.

If the procedure modifies L, these changes will not affect V, which may also be in scope inside the procedure, until the procedure returns, when the final value of L is copied to V. Under call-by-reference, changes to L would affect V immediately.

Used, for example, by BBC BASIC V on the Acorn Archimedes.

This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.