P4_ANEW(3)

NAME
p4_anew - ANEW ( 'name' -- )

SYNOPSIS

#include <pfe/core-mix.h>

FCode p4_anew(---);

DESCRIPTION

creates a MARKER if it doesn't exist, or forgets everything after it if it does. (it just gets executed).

Note: in PFE the ANEW will always work on the ENVIRONMENT-WORDLIST which has a reason: it is never quite sure whether the same DEFINITIONS wordlist is in the search ORDER that the original ANEW MARKER was defined in. Therefore, ANEW would be only safe on systems that do always stick to FORTH DEFINITIONS. Instead we will CREATE the ANEW MARKER in the ENVIRONMENT and use a simple SEARCH-WORDLIST on the ENVIRONMENT-WORDLIST upon re-run.

      \ old
      : ANEW BL WORD   DUP FIND NIP IF EXECUTE THEN   (MARKER) ;
      \ new
      : ANEW
        PARSE-WORD  2DUP ENVIRONMENT-WORDLIST SEARCH-WORDLIST IF  EXECUTE  THEN
        GET-CURRENT &gt;R ENVIRONMENT-WORDLIST SET-CURRENT  (MARKER)  R&gt; SET-CURRENT ;

AUTHOR

    • Guido U. Draheim (modified by $Author: guidod $)

COPYRIGHT

Copyright (C) Tektronix, Inc. 1998 - 2001. Copyright (C) 2005 - 2008 Guido U. Draheim <guidod@gmx.de>