File:  [gforth] / gforth / compat / control.fs
Revision 1.1: download - view: text, annotated - select for diffs
Fri Feb 9 17:34:34 1996 UTC (28 years, 1 month 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.)

\ control-structure add-ons (ENDIF, ?DUP-IF etc.)

\ This file is in the public domain. NO WARRANTY.

\ Hmm, this would be a good application for ]] ... [[

: ENDIF ( compilation orig -- ; run-time -- ) \ gforth
    POSTPONE then ; immediate

: ?DUP-IF ( compilation -- orig ; run-time n -- n| ) \ gforth	question-dupe-if
    POSTPONE ?dup POSTPONE if ; immediate

: ?DUP-0=-IF ( compilation -- orig ; run-time n -- n| ) \ gforth	question-dupe-zero-equals-if
    POSTPONE ?dup POSTPONE 0= POSTPONE if ; immediate

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