www.delorie.com/gnu/docs/gforth/gforth_202.html   search  
Buy GNU books!

Gforth Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1 `ans-report.fs': Report the words used, sorted by wordset

If you want to label a Forth program as ANS Forth Program, you must document which wordsets the program uses; for extension wordsets, it is helpful to list the words the program requires from these wordsets (because Forth systems are allowed to provide only some words of them).

The `ans-report.fs' tool makes it easy for you to determine which words from which wordset and which non-ANS words your application uses. You simply have to include `ans-report.fs' before loading the program you want to check. After loading your program, you can get the report with print-ans-report. A typical use is to run this as batch job like this:
gforth ans-report.fs myprog.fs -e "print-ans-report bye"

The output looks like this (for `compat/control.fs'):
The program uses the following words
from CORE :
: POSTPONE THEN ; immediate ?dup IF 0= 
from BLOCK-EXT :
from FILE :

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003