Skip to content
45 changes: 45 additions & 0 deletions documentation.frt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,48 @@ Drop the topmost element of the stack
( a b -- b a )
Swap two topmost elements of the stack
" doc-word

' cr g"
( -- )
Make following output appear at the beginning of the next line
" doc-word

' case g"
( -- )
Tell where is the beginning of the "case...of...endof...endcase" - structure
" doc-word

' of g"
( -- )
Mark the start of code for a "case" - clause in the "case...of...endof...endcase" - structure
" doc-word

' endof g"
( -- )
Mark the end of code for a "case" - clause in the "case...of...endof...endcase" - structure
" doc-word

' endcase g"
( -- )
Tell where is the ending of the "case...of...endof...endcase" - structure
" doc-word

' in-range g"
( number numfrom numto -- 1/0 )
Check if number "number" is in range from "numfrom" to "numto"; places 1 on top of the stack if it is in range or 0 otherwise
" doc-word

' compiling g"
( -- state )
Place the current "Forthress" state on top of the stack, i.e. 0 for "interpretation" mode or 1 for "compilation" mode
" doc-word

' .' g"
( -- character )
Place character code ( according to ASCII - table ) on top of the stack
" doc-word

' readce g"
( -- character )
Read character and places its "ASCII" - code on top of the stack and place 0 for control characters excluding the case with newline-character, i.e '\n'
" doc-word