]> gitweb.factorcode.org Git - factor.git/blob - basis/qualified/qualified-docs.factor
Minor doc clarification
[factor.git] / basis / qualified / qualified-docs.factor
1 USING: help.markup help.syntax ;
2 IN: qualified
3
4 HELP: QUALIFIED:
5 { $syntax "QUALIFIED: vocab" }
6 { $description "Similar to " { $link POSTPONE: USE: } " but loads vocabulary with prefix." }
7 { $examples { $example
8     "USING: prettyprint qualified ;"
9     "QUALIFIED: math"
10     "1 2 math:+ ." "3"
11 } } ;
12
13 HELP: QUALIFIED-WITH:
14 { $syntax "QUALIFIED-WITH: vocab word-prefix" }
15 { $description "Works like " { $link POSTPONE: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." }
16 { $examples { $code
17     "USING: prettyprint qualified ;"
18     "QUALIFIED-WITH: math m"
19     "1 2 m:+ ."
20     "3"
21 } } ;
22
23 HELP: FROM:
24 { $syntax "FROM: vocab => words ... ;" }
25 { $description "Imports " { $snippet "words" } " from " { $snippet "vocab" } "." }
26 { $examples { $code
27     "FROM: math.parser => bin> hex> ; ! imports only bin> and hex>" } } ;
28
29 HELP: EXCLUDE:
30 { $syntax "EXCLUDE: vocab => words ... ;" }
31 { $description "Imports everything from " { $snippet "vocab" } " excluding " { $snippet "words" } "." }
32 { $examples { $code
33     "EXCLUDE: math.parser => bin> hex> ; ! imports everything but bin> and hex>" } } ;
34
35 HELP: RENAME:
36 { $syntax "RENAME: word vocab => newname " }
37 { $description "Imports " { $snippet "word" } " from " { $snippet "vocab" } ", but renamed to " { $snippet "newname" } "." }
38 { $examples { $example
39     "USING: prettyprint qualified ;"
40     "RENAME: + math => -"
41     "2 3 - ."
42     "5"
43 } } ;
44
45 ARTICLE: "qualified" "Qualified word lookup"
46 "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: } "."
47 $nl
48 "These words are useful when there is no way to avoid using two vocabularies with identical word names in the same source file."
49 { $subsection POSTPONE: QUALIFIED: }
50 { $subsection POSTPONE: QUALIFIED-WITH: }
51 { $subsection POSTPONE: FROM: }
52 { $subsection POSTPONE: EXCLUDE: }
53 { $subsection POSTPONE: RENAME: } ;
54
55 ABOUT: "qualified"