From c725c089d435aee4920ac97188799c927d0c07ae Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 30 Dec 2013 03:51:28 +0400 Subject: [PATCH] updated the Slang docs... Signed-off-by: Alex A. Naanou --- Slang/slang.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Slang/slang.js b/Slang/slang.js index ff6efd2..74137d5 100755 --- a/Slang/slang.js +++ b/Slang/slang.js @@ -516,10 +516,17 @@ var BOOTSTRAP = [ ':: isT ( a -- b ) [ not not true eq ]', ':: isF ( a -- b ) [ not isT ]', '', -'-- this defines a classic [ cond ] [ A ] [ B ] if word... (a bit too polish IMHO)', +'-- Classic conditional word:', +'-- [ cond ] [ A ] [ B ] if', +'--', +'-- A bit too "polish" in my view ;)', ':: if ( cond a b -- ... ) [ rot rot exec isT tor and tor or exec ]', '', -'-- helpers for the ternary operator...', +'-- Ternary operator, this can take two forms:', +'-- COND ? A', +'-- COND ? A else B', +'--', +'-- We will define this in stages, first the helpers:', '-- run then block and drop \'else B\' if it exists...', ':: _run_then ( a x | -- ... | x )', ' ( a else | b -- ... | )', @@ -532,6 +539,7 @@ var BOOTSTRAP = [ ' [ drop dup \\ else eq [ drop \\ exec _swap 4 ] and', ' [ 1 _push 2 ] or', ' b2s 0 _swapN ]', +'-- And now the main operator...', '-- NOTE: this may actually have one of three stack effects...', ':: ? ( c | a -- | )', ' ( c | a -- ... | )',