Information¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
Information[symbol]
or ?symbol returns information on symbol.
Examples (4)¶
Every input below was run against the current Mathilda build and its output recorded.
Basic examples (2)¶
Applications (2)¶
Information hands back the docstring as a string
Its result is a String
Implementation notes¶
builtin_information (src/core.c) looks up the symbol's docstring with symtab_get_docstring and returns it as a string. If none exists it returns a string No information available for symbol "..." using context_display_name for the shortened name. (The interactive ?name syntax routes to the same docstring store.)
Attributes: HoldAll, Protected.
References¶
- Source:
src/core.c - Specification:
docs/spec/builtins/expression-information.md - Tests:
tests/test_blas.c - Tests:
tests/test_core.c - Tests:
tests/test_eigen.c - Tests:
tests/test_graphics.c
Notes & additional examples¶
Notes¶
Information[sym] returns the symbol's docstring ā the same text the interactive ?sym
shortcut prints ā as a string, or a No information available string when the symbol has
none. Every builtin registers its docstring via symtab_set_docstring, which is the store
both Information and ?sym read.
Because the result is the usage text itself (long, multi-line, and specific to the symbol
asked about), the examples above probe it structurally; in the REPL you would simply type
?Sin.