2006-03-25 01:06:52 -05:00
IN: words
USING: help ;
HELP: annotate "( word quot -- )"
{ $values { "word" "a word" } { "quot" "a quotation with stack effect " { $snippet "( word def -- def )" } } }
{ $description "Changes a word definition to the result of applying a quotation to the old definition." }
{ $notes "This is the common word to implement " { $link watch } ", " { $link break } ", " { $link break-on } " and " { $link profile } "." } ;
HELP: watch "( word -- )"
{ $values { "word" "a word" } }
{ $description "Changes a word definition so that a message together with the stack contents is output before and after the word runs." } ;
HELP: break "( word -- )"
{ $values { "word" "a word" } }
2006-03-25 17:01:39 -05:00
{ $description "Changes a word definition so that it runs in the single stepper. See " { $link "walker" } "." } ;
2006-03-25 01:06:52 -05:00
HELP: break-on "( word quot -- )"
{ $values { "word" "a word" } { "quot" "a quotation with stack effect " { $snippet "( -- ? )" } } }
2006-03-25 17:01:39 -05:00
{ $description "Changes a word definition so that the quotation runs first, and if it outputs a true value, the word runs in the single stepper. See " { $link "walker" } "." } ;
2006-03-25 01:06:52 -05:00
HELP: profile "( word -- )"
{ $values { "word" "a word" } }
{ $description "Changes a word definition so that the total runtime is added to a variable keyed by the word in the global namespace." }
{ $examples
{ $example
": foo 1000000 [ drop ] each ;\n\\ foo profile\n\\ foo get ." "931"
}
} ;