Parameter Passing: Difference between revisions

No edit summary
Line 143:
 
===Example [[M2000 Interpreter]]===
All parameters are passed by value is a stack of values. This stack is a collection of values, and that collection is passed from a module to a module as is, atand also used for return back values. Functions start with a fresh stack of values, and at that stack all the parameters from the call stored there. To read parameters from start of values we use Read. A definition Function a(k as integer) {code here} is identical with that: Function a {read j as integer : code here}. Because we can use read at any point of a module or function we can handle parameters with many ways before actually pop them from the stack, like we can check type, we can rearrange and use the stack of values for any use.
 
We can pass by reference values, although actually we store a weak reference and at the Read statement this reference change to normal if it is valid (or an error occur). So call thisModule &Z pass a string as a weak reference, and at the thisModule we have the Read &t which make t to hold the same memory as the Z.
Line 168:
call kappa
</syntaxhighlight>
 
 
 
 
===Example [[Z80 Assembly]]===
404

edits