From a76977af62010a392c16010c367185e61e856ffe Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 30 Oct 2019 20:04:56 +0100 Subject: mv to docs --- docs/buzzard/demo6.th | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/buzzard/demo6.th (limited to 'docs/buzzard/demo6.th') diff --git a/docs/buzzard/demo6.th b/docs/buzzard/demo6.th new file mode 100644 index 0000000..75ec667 --- /dev/null +++ b/docs/buzzard/demo6.th @@ -0,0 +1,18 @@ +: foobar + 2 + [ 2 , ( '[' turns the compiler off, allowing us to execute code ) + 1 1 1 + + , ( and we compile in-line a 2 and a three ) + ( the '2' means 'push the number following this' ) + ] + + . cr +; + +foobar + +: 'foobar ' foobar ; ( ' can only be run inside the compiler ) + ( ' leaves the address of the following word + on the stack ) + +'foobar . cr + +'foobar dump -- cgit v1.2.3