25 lines
986 B
Plaintext
25 lines
986 B
Plaintext
USING: help ;
|
|
|
|
HELP: HELP: "word stack-effect content..."
|
|
{ $values { "word" "a word" } { "stack-effect" "a stack effect or syntax string" } { "content" "markup elements" } }
|
|
{ $description "Defines documentation for a word." }
|
|
{ $examples
|
|
{ $code
|
|
": foo 2 + ;"
|
|
"HELP: foo \"( m -- n )\""
|
|
"{ $values { \"m\" \"an integer\" } { \"n\" \"an integer\" } }"
|
|
"{ $description \"Increments a value by 2.\" } ;"
|
|
"\ foo help"
|
|
}
|
|
} ;
|
|
|
|
HELP: ARTICLE: "topic title content..."
|
|
{ $values { "topic" "an object" } { "title" "a string" } { "content" "markup elements" } }
|
|
{ $description "Defines a help article. String topic names are reserved for core documentation. Contributed modules should name articles by arrays, where the first element of an array identifies the module; for example, " { $snippet "{ \"httpd\" \"intro\" }" } "." }
|
|
{ $examples
|
|
{ $code
|
|
"ARTICLE: \"example\" \"An example article\""
|
|
"\"Hello world.\" ;"
|
|
}
|
|
} ;
|