( patch day 13.05.2001 )

\ ' bar ' foo replace-word 
\ defined in gforth's ans-report.fs
\ patch foo by bar

: colon? ( xt -- f )
  t> w@ ['] INIT t> w@ =
;

: replace-word ( by-xt what-xt )
   dup colon? 0=
   abort" not a colon!"
   tuck 2+ t-w!
   ['] exit swap cell+ t-w!
;

\eof

: test ." .s occured :)" ;

' test ' .s replace-word
.s