2008-01-05 17:27:15 -05:00
USING: help.markup help.syntax ;
IN: qualified
2007-09-20 18:09:08 -04:00
HELP: QUALIFIED:
{ $syntax "QUALIFIED: vocab" }
{ $description "Similar to " { $link POSTPONE: USE: } " but loads vocabulary with prefix." }
2008-12-02 17:27:54 -05:00
{ $examples { $example
"USING: prettyprint qualified ;"
"QUALIFIED: math"
"1 2 math:+ ." "3"
} } ;
2008-04-12 12:27:46 -04:00
HELP: QUALIFIED-WITH:
2008-04-12 17:27:04 -04:00
{ $syntax "QUALIFIED-WITH: vocab word-prefix" }
{ $description "Works like " { $link POSTPONE: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." }
2008-04-12 12:27:46 -04:00
{ $examples { $code
2008-12-02 17:27:54 -05:00
"USING: prettyprint qualified ;"
"QUALIFIED-WITH: math m"
"1 2 m:+ ."
"3"
} } ;
2008-04-12 12:27:46 -04:00
HELP: FROM:
{ $syntax "FROM: vocab => words ... ;" }
2008-04-12 17:24:31 -04:00
{ $description "Imports " { $snippet "words" } " from " { $snippet "vocab" } "." }
2008-04-12 12:27:46 -04:00
{ $examples { $code
"FROM: math.parser => bin> hex> ; ! imports only bin> and hex>" } } ;
HELP: EXCLUDE:
{ $syntax "EXCLUDE: vocab => words ... ;" }
2008-04-12 17:24:31 -04:00
{ $description "Imports everything from " { $snippet "vocab" } " excluding " { $snippet "words" } "." }
2008-04-12 12:27:46 -04:00
{ $examples { $code
2008-05-07 16:15:31 -04:00
"EXCLUDE: math.parser => bin> hex> ; ! imports everything but bin> and hex>" } } ;
2008-04-12 12:27:46 -04:00
HELP: RENAME:
{ $syntax "RENAME: word vocab => newname " }
2008-04-12 17:24:31 -04:00
{ $description "Imports " { $snippet "word" } " from " { $snippet "vocab" } ", but renamed to " { $snippet "newname" } "." }
2008-12-02 17:27:54 -05:00
{ $examples { $example
"USING: prettyprint qualified ;"
2008-04-12 12:27:46 -04:00
"RENAME: + math => -"
2008-12-02 17:27:54 -05:00
"2 3 - ."
"5"
} } ;
2008-04-12 12:27:46 -04:00
2008-11-08 20:33:15 -05:00
ARTICLE: "qualified" "Qualified word lookup"
"The " { $vocab-link "qualified" } " vocabulary provides a handful of parsing words which give more control over word lookup than is offered by " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } "."
$nl
"These words are useful when there is no way to avoid using two vocabularies with identical word names in the same source file."
{ $subsection POSTPONE: QUALIFIED: }
{ $subsection POSTPONE: QUALIFIED-WITH: }
{ $subsection POSTPONE: FROM: }
{ $subsection POSTPONE: EXCLUDE: }
{ $subsection POSTPONE: RENAME: } ;
ABOUT: "qualified"