中文化
: to-upper \ char --- char ; convert to upper case
dup [char] a [char] z 1+ within if
bl -
then ;
gforth 使用到 to-upper 六個位置
F:\Project\Forth\Project\gforth\arch\misc\tt.fs
283: : to-upper \ char --- char ; convert to upper case
287: case key to-upper
333: s" Again? " bottom-msg key to-upper [char] Y =
F:\Project\Forth\Project\gforth\tt.fs
314: : to-upper \ char --- char ; convert to upper case
320: case key to-upper
368: s" Again? " bottom-msg key to-upper [char] Y =
F:\Project\Forth\Project\gforth\kernel\int.fs
: quit ( ?? -- ?? ) \ core
\G Empty the return stack, make the user input device
\G the input source, enter interpret state and start
\G the text interpreter.
rp0 @ rp! handler off clear-tibstack
[ has? new-input 0= [IF] ] >tib @ >r [ [THEN] ]
BEGIN
[ has? compiler [IF] ]
[compile] [
[ [THEN] ]
\ stack depths may be arbitrary here
['] 'quit CATCH dup
WHILE
<# \ reset hold area, or we may get another error
DoError
\ stack depths may be arbitrary still (or again), so clear them
clearstacks
[ has? new-input [IF] ] clear-tibstack
[ [ELSE] ] r@ >tib ! r@ tibstack !
[ [THEN] ]
REPEAT
drop [ has? new-input [IF] ] clear-tibstack
[ [ELSE] ] r> >tib !
[ [THEN] ] ;