your wordset

description

-- user-supplied additional primitives

Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved.

description: This wordset is the place to add any additional primitives you might wish. A set of words do already live here that must be bound statically into the main pfe-object to work out smart and nicely.

EXTENSIONS

!> ( .. )();
as:"store-back";

immediate synonym !>

is doing the same as TO

this word is provided only for compatibility with common forth usage in programs. Thegiven synonym should be preferred however.

EXTENSIONS

@> ( [name] -- value )();
p4:"fetch-from";

does fetch the value from the PFA of the named item, which may be about everything, including a VARIABLE , VALUE LVALUE , LOCALS| , VAR , DEFER , DOER , DOES> and more.

EXTENSIONS

'> ( [name] -- xt )();
p4:"tick-from";

get the execution-token, ie the CFA, of the word following. This word is fully state-smart while the ANSI standard words namely ' and ['] are not.

EXTENSIONS

INTO ( [name] -- pfa )();
p4:"into";

will return the parameter-field address of the following word. Unlike others, this word will also return the address of LOCALS| and local LVALUE - so in fact a TO A and INTO A ! are the same. This word is most useful when calling C-exported function with a temporary local-VAR as a return-place argument - so the address of a local has to be given as an arg. Beware that you should not try to save the address anywhere else, since a local's address does always depend of the RP-depth - EXIT from a colon-word and the value may soon get overwritten. (see also TO )

EXTENSIONS

&OF ( .. )();
as:"and-of";

immediate synonym &OF

is doing the same as INTO

this word is provided only for compatibility with common forth usage in programs. Thegiven synonym should be preferred however.

EXTENSIONS

.H2 ( value -- )();
p4:"dot-h2";

print hexadecimal, but with per-byte 0-padding

   0x0     -> 00
   0xf     -> 0f
   0x12    -> 12
   0x123   -> 0123
   0x1234  -> 1234
   0x12345 -> 012345
 
EXTENSIONS
HERE-WORD ( char "name<char>" -- )(); 
 ;

a FIG-compatible WORD. Where ANSI says "skip leading delimiters" this one acts as "skip leading whitespace". And it will not return anything and have the string parsed to HERE

EXTENSIONS

FIG-WORD ( .. )();
as:"fig-minus-word";

obsolete forthword FIG-WORD

is doing the same as HERE-WORD

This word should be replaced. It will be deleted in the near future. Instead use the (newer) synonym word given above.