Call by value-result?

Is there something like a "default result" in c programming? If it exists, what is the difference between “by value” and “call sign-result-result”? Or are both the same?

+4
source share
2 answers

call sign definition

An agreement on passing arguments, where the actual argument is the variable V whose value is copied to the local variable L inside the called function or procedure. If the procedure changes L, these changes will not affect V, which can also be in the area in the procedure, as long as the procedure returns when the final value of L is copied to V. Under the changes by reference to L, they will immediately affect V. Used for For example, BBC BASIC V at Acorn Archimedes.

Source: http://dictionary.reference.com/browse/call-by-value-result

As Oli said, C includes default behavior.

+4
source

Not really. C is actually a call sign. If you need other behavior, you will have to emulate it manually.

+2
source

Source: https://habr.com/ru/post/1346001/


All Articles