From 482f1f64413e2d180822d488a70c830037790e1e Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 21 Dec 2017 13:13:22 -0800 Subject: [PATCH] Add special LVALUE, 'drop' --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 58f38e0..0207c13 100755 --- a/README.md +++ b/README.md @@ -1018,6 +1018,12 @@ predef bivalfunc#2 a, b = bivalfunc() // Two values returned from function stack[0], stack[1], stack[3] = 0, stack[0], stack[1] // Push 0 to bottom of three element stack ``` +Should multiple values be returned, but only a subset is interesting, the special value `drop` can be used to ignore values. +``` +predef trivalfunc#3 + +drop, drop, c = trivalfunc() // Three values returned from function, but we're only interested in the last one +``` #### Empty Assignments An assignment doesn't even need to save the expression into memory, although the expression will be evaluated. This can be useful when referencing hardware that responds just to being accessed. On the Apple II, the keyboard is read from location $C000, then the strobe, telling the hardware to prepare for another key press is cleared by just reading the address $C010. In PLASMA, this looks like: