  PFE 0.33.71 Homepage SourceForge Download Documentation -Overview -The PFE Manual old manual / (book) -ChangeLog -Authors -License (LGPL) -Wordsets / (book) -Functions .. (book) -Dp of ANS Forth -The 4thTutor -Forthprimer.pdf - Old Wordsets - Old Words List Forth Links * Forth Repository * Taygeta Compilation * TinyBoot FirmWare * FiCL, Free Forth * Research Vienna * Research Bournemouth * zForth WebRing Other Links * Tektronix/MPT * Forth Org. (FIG) * Forth Inc. * MPE Ltd. Forths * SF Win32Forth * PD Win32Forth * Neil Bawd generated (C) Guido U. Draheim guidod@gmx.de | ## CORE-Misc Compatibility words `0<=``( a -- flag )``` => `"FORTH"`
        simulate    : 0<= 0> 0= ;
  primitive code = [p4_zero_less_equal] `0>=``( a -- flag )``` => `"FORTH"`
        simulate    : 0>= 0< 0= ;
  primitive code = [p4_zero_greater_equal] `<=``( a b -- flag )``` => `"FORTH"`
        simulate    : <= > 0= ;
  primitive code = [p4_less_equal] `>=``( a b -- flag )``` => `"FORTH"`
        simulate    : >= < 0= ;
  primitive code = [p4_greater_equal] `U<=``( a b -- flag )``` => `"FORTH"`
        simulate    : U<= U> 0= ;
  primitive code = [p4_u_less_equal] `U>=``( a b -- flag )``` => `"FORTH"`
        simulate    : U>= U< 0= ;
  primitive code = [p4_u_greater_equal] `UMIN``( a b -- min )``` => `"FORTH"` see `MIN` , `MAX` and `UMAX` primitive code = [p4_u_min] `UMAX``( a b -- max )``` => `"FORTH"` see `MAX` primitive code = [p4_u_max] `.VERSION``( -- )``` => `"FORTH"` show the version of the current PFE system
        : .VERSION [ ENVIRONMENT ] FORTH-NAME TYPE FORTH-VERSION TYPE ;
  primitive code = [p4_dot_version] `.CVERSION``( -- )``` => `"FORTH"` show the compile date of the current PFE system
        : .CVERSION [ ENVIRONMENT ] FORTH-NAME TYPE FORTH-DATE TYPE ;
  primitive code = [p4_dot_date] `LICENSE``( -- )``` => `"FORTH"` show a lisence info - the basic PFE system is licensed under the terms of the LGPL (Lesser GNU Public License) - binary modules loaded into the system and hooking into the system may carry another `LICENSE`
        : LICENSE [ ENVIRONMENT ] FORTH-LICENSE TYPE ;
  primitive code = [p4_license] `WARRANTY``( -- )``` => `"FORTH"` show a warranty info - the basic PFE system is licensed under the terms of the LGPL (Lesser GNU Public License) - which exludes almost any liabilities whatsoever - however loadable binary modules may hook into the system and their functionality may have different WARRANTY infos. primitive code = [p4_warranty] `STRING,``( str len -- )``` => `"FORTH"` Store a string in data space as a counted string.
        : STRING, HERE  OVER 1+  ALLOT  PLACE ;
  primitive code = [p4_string_comma] `PARSE,``( "chars<">" -- )``` => `"FORTH"` Store a char-delimited string in data space as a counted string. As seen in Bawd's
        : ," [CHAR] " PARSE  STRING, ; IMMEDIATE
  this implementation is much different from Bawd's
        : PARSE, PARSE STRING, ;
  primitive code = [p4_parse_comma] `PARSE,"``` => `"FORTH"` (no description) immediate code = [p4_parse_comma_quote] `DEFINED``( "name" -- flag )``` => `"FORTH"` Search the dictionary for _name_. If _name_ is found, return TRUE; otherwise return FALSE. Immediate for use in definitions. This word will actually return what `FIND` returns (the NFA). does check for the word using find (so it does not throw like `'` ) and puts it on stack. As it is immediate it does work in compile-mode too, so it places its argument in the cs-stack then. This is most useful with a directly following `[IF]` clause, so that sth. like an `[IFDEF] word` can be simulated through `[DEFINED] word [IF]`
        : DEFINED BL WORD COUNT (FIND-NFA) ;
  primitive code = [p4_defined] `[DEFINED]``( "name" -- flag )``` => `"FORTH"` Search the dictionary for _name_. If _name_ is found, return TRUE; otherwise return FALSE. Immediate for use in definitions. [DEFINED] word ( -- nfa|0 ) immediate does check for the word using find (so it does not throw like `'` ) and puts it on stack. As it is immediate it does work in compile-mode too, so it places its argument in the cs-stack then. This is most useful with a directly following `[IF]` clause, so that sth. like an `[IFDEF] word` can be simulated through `[DEFINED] word [IF]`
        : [DEFINED] BL WORD FIND NIP ; IMMEDIATE
  immediate code = [p4_defined] `[UNDEFINED]``( "name" -- flag )``` => `"FORTH"` Search the dictionary for _name_. If _name_ is found, return FALSE; otherwise return TRUE. Immediate for use in definitions. see `[DEFINED]` immediate code = [p4_undefined] `(MARKER)``( str-ptr str-len -- )``` => `"FORTH"` create a named marker that you can use to `FORGET` , running the created word will reset the dict/order variables to the state at the creation of this name.
        : (MARKER) (CREATE) HERE ,
                GET-ORDER DUP , 0 DO ?DUP IF , THEN LOOP 0 ,
                ...
          DOES> DUP @ (FORGET)
                ...
        ;
  primitive code = [p4_paren_marker] `ANEW``( 'name' -- )``` => `"FORTH"` 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 >R ENVIRONMENT-WORDLIST SET-CURRENT  (MARKER)  R> SET-CURRENT ;
primitive code = [p4_anew]