Help on using erlang for a module function

I am working in a shell and I want to view the help for a function io:format/1

.

My thought path looks like this:

  • execute help()

    - I find the commandm().

  • execute m(io)

    - I see a list of functions in the moduleio

Question: How can I expand the help system for a function io:format/1

from the erlang shell?


Exit from help().

:

1> help().
...
m(Mod)     -- information about module <Mod>
memory()   -- memory allocation information
...
true

      

Exit from m(io).

:

2> m(io).
Module io compiled: Date: July 10 2013, Time: 10.46
Compiler options:  [{outdir,"/build/buildd/erlang-16.b.1-dfsg/lib/stdlib/src/../ebin"},
                    {i,"/build/buildd/erlang-16.b.1-dfsg/lib/stdlib/src/../include"},
                    {i,"/build/buildd/erlang-16.b.1-dfsg/lib/stdlib/src/../../kernel/include"},
                    warnings_as_errors,debug_info]
Object file: /usr/lib/erlang/lib/stdlib-1.19.2/ebin/io.beam
Exports: 
columns/1                     parse_erl_form/2
columns/0                     parse_erl_form/3
format/1                      parse_erl_form/4
format/2                      printable_range/0
format/3                      put_chars/2
...
parse_erl_exprs/4             setopts/2
parse_erl_exprs/3             setopts/1
parse_erl_form/1              write/1
                              write/2
ok

      

+3


source to share


1 answer


Help texts for functions in the standard library are not available for Erlang programs and shell sessions, unlike Python, Lisp, etc.

The way I decided to find the documentation is this Firefox special bookmark for the URL http://www.erlang.org/doc/man/%s.html

. I assigned eas a hotkey to this bookmark so that I can type e io

in Firefox's address bar and redirect to http://www.erlang.org/doc/man/io.html , which has documentation for the functions in the module io

.



Alternatively, you can find http://erldocs.com/ . It allows you to enter the name of the function you are looking for and go directly to its documentation.

+4


source







All Articles