mirror of
https://github.com/flynx/Slang.git
synced 2025-10-29 02:30:08 +00:00
updated the Slang docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fc3e135d70
commit
c725c089d4
@ -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 -- ... | )',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user