From 03936643a163cdff4d0948de66e294b307fefbcb Mon Sep 17 00:00:00 2001 From: Attila Magyar Date: Sat, 19 Jun 2021 21:43:27 +0200 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9666093..6d3b2b9 100644 --- a/README.md +++ b/README.md @@ -120,13 +120,29 @@ For example: Control structres are compile time words with no interpretation semantics. - ## Locals -## Maps +``` +: example ( a b -- n ) + -> b -> a 42 -> c 0 => d + a b + c * d ! + d @ ; +``` + +There are two types of locals in FCL. Local constant `->` and local variable `=>`. + +`-> name` loads the top of the stack into the local, called `name`. + +`name` pushes the value of the local. + +`=> name` loads the top of the stack into the local, called `name`. + +`name` pushes the reference of the local. `name @` pushes the value of the local. ## List +## Maps + ## Quotations ## HTTP