tools.walker: Give examples for breakpoint and breakpoint-if. Reported by tgunr
parent
75a1303a36
commit
ee1c45a403
|
@ -3,11 +3,23 @@ USING: help.syntax help.markup tools.continuations sequences math words ;
|
||||||
|
|
||||||
HELP: breakpoint
|
HELP: breakpoint
|
||||||
{ $values { "word" word } }
|
{ $values { "word" word } }
|
||||||
{ $description "Annotates a word definition to enter the single stepper when executed." } ;
|
{ $description "Annotates a word definition to enter the single stepper when executed." }
|
||||||
|
{ $examples
|
||||||
|
{ $unchecked-example "USE: tools.walker \\ sq breakpoint"
|
||||||
|
""
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
HELP: breakpoint-if
|
HELP: breakpoint-if
|
||||||
{ $values { "word" word } { "quot" { $quotation "( -- ? )" } } }
|
{ $values { "word" word } { "quot" { $quotation "( -- ? )" } } }
|
||||||
{ $description "Annotates a word definition to enter the single stepper if the quotation yields true." } ;
|
{ $description "Annotates a word definition to enter the single stepper if the quotation yields true. The quotation has access to the datastack as it exists just before " { $snippet "word" } " is called." }
|
||||||
|
{ $examples
|
||||||
|
"Break if the input to sq is 3:"
|
||||||
|
{ $unchecked-example
|
||||||
|
"USE: tools.walker \\ sq [ dup 3 = ] breakpoint-if"
|
||||||
|
""
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
HELP: B
|
HELP: B
|
||||||
{ $description "An alias for " { $link break } ", defined in the " { $vocab-link "syntax" } " vocabulary so that it is always available." } ;
|
{ $description "An alias for " { $link break } ", defined in the " { $vocab-link "syntax" } " vocabulary so that it is always available." } ;
|
||||||
|
|
Loading…
Reference in New Issue