File:  [gforth] / gforth / compat / control.fs
Revision 1.1: download - view: text, annotated - select for diffs
Fri Feb 9 17:34:34 1996 UTC (25 years, 9 months ago) by anton
Branches: MAIN
CVS tags: v0-3-0, v0-2-1, v0-2-0, HEAD
?DUP-IF and ?DUP-0=-IF are now supported by primitives
added primitives EMIT-FILE, STDOUT, STDERR
EMIT and TYPE now work through file words
added some code for the BUGGY_LONG_LONG case (not yet complete)
eliminated D! and D@
made DMIN, DMAX, DABS high-level
added compat/control.fs (?DUP-IF etc.)

    1: \ control-structure add-ons (ENDIF, ?DUP-IF etc.)
    2: 
    3: \ This file is in the public domain. NO WARRANTY.
    4: 
    5: \ Hmm, this would be a good application for ]] ... [[
    6: 
    7: : ENDIF ( compilation orig -- ; run-time -- ) \ gforth
    8:     POSTPONE then ; immediate
    9: 
   10: : ?DUP-IF ( compilation -- orig ; run-time n -- n| ) \ gforth	question-dupe-if
   11:     POSTPONE ?dup POSTPONE if ; immediate
   12: 
   13: : ?DUP-0=-IF ( compilation -- orig ; run-time n -- n| ) \ gforth	question-dupe-zero-equals-if
   14:     POSTPONE ?dup POSTPONE 0= POSTPONE if ; immediate

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>