PFE - Portable Forth Environment - pfe Forth Wordsets

  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 | ## Search-order + extensions `DEFINITIONS``( -- )``` => `"[ANS] FORTH"` make the current context-vocabulary the definition-vocabulary, that is where new names are declared in. see `ORDER` primitive code = [p4_definitions] `GET-CURRENT``( -- voc )``` => `"[ANS] FORTH"` return the current definition vocabulary, see `DEFINITIONS` primitive code = [p4_get_current] `GET-ORDER``( -- vocn ... voc1 n )``` => `"[ANS] FORTH"` get the current search order onto the stack, see `SET-ORDER` primitive code = [p4_get_order] `SEARCH-WORDLIST``( str-ptr str-len voc -- 0 | xt 1 | xt -1 )``` => `"[ANS] FORTH"` almost like `FIND` or `(FIND)` -- but searches only the specified vocabulary. primitive code = [p4_search_wordlist] `SET-CURRENT``( voc -- )``` => `"[ANS] FORTH"` set the definition-vocabulary. see `DEFINITIONS` primitive code = [p4_set_current] `SET-ORDER``( vocn ... voc1 n -- )``` => `"[ANS] FORTH"` set the search-order -- probably saved beforehand using `GET-ORDER` primitive code = [p4_set_order] `WORDLIST``( -- voc )``` => `"[ANS] FORTH"` return a new vocabulary-body for private definitions. primitive code = [p4_wordlist] `ALSO``( -- )``` => `"[ANS] FORTH"` a `DUP` on the search `ORDER` - each named vocabulary replaces the topmost `ORDER` vocabulary. Using `ALSO` will make it fixed to the search-order. (but it is not nailed in trap-conditions as if using `DEFAULT-ORDER` )
        order:   vocn ... voc2 voc1 -- vocn ... voc2 voc1 voc1
  primitive code = [p4_also] `ORDER``( -- )``` => `"[ANS] FORTH"` show the current search-order, followed by the `CURRENT` `DEFINITIONS` vocabulary and the `ONLY` base vocabulary primitive code = [p4_order] `PREVIOUS``( -- )``` => `"[ANS] FORTH"` the invers of `ALSO` , does a `DROP` on the search `ORDER` of vocabularies.
        order: vocn ... voc2 voc1 -- vocn ... voc2
        example: ALSO PRIVATE-VOC DEFINTIONS (...do some...) PREVIOUS DEFINITIONS
primitive code = [p4_previous] `DEFAULT-ORDER``( -- )``` => `"FORTH"` nail the current search `ORDER` so that it will even survive a trap-condition. This default-order can be explicitly loaded with `RESET-ORDER` primitive code = [p4_default_order] `RESET-ORDER``( -- )``` => `"FORTH"` load the `DEFAULT-ORDER` into the current search `ORDER` - this is implicitly done when a trap is encountered. primitive code = [p4_reset_order]