[erlang-bugs] erlang documentation error

Xynos K (AT) kxynos@REDACTED
Sun Nov 23 17:54:42 CET 2008


In the documentation 'Getting Started With Erlang' Version 5.6.5 at http://www.erlang.org/doc/getting_started/part_frame.html 
under the section 2.3 'Atoms' there is a mistake on the error message demonstration shell function v/1.   
The error on the function convert/2 occurs at line 12:

  12> tut2:convert(3, miles).
  ** exception error: no function clause matching tut2:convert(3,miles)

and the yet documentation points the shell function v/1 to line 13, instead of line 12 

  13> v(13)
  {'EXIT',{function_clause,[{tut2,convert,[3,miles]},
                          {erl_eval,do_apply,5},
                          {shell,exprs,6},
                          {shell,eval_exprs,6},
                          {shell,eval_loop,3}]}}

therefore the argument to v/2 should be 12:

  13> v(12)
  {'EXIT',{function_clause,[{tut2,convert,[3,miles]},
                          {erl_eval,do_apply,5},
                          {shell,exprs,6},
                          {shell,eval_exprs,6},
                          {shell,eval_loop,3}]}}

Konstantinos Xynos
ISRG Blog: http://isrg.weblog.glam.ac.uk
Web Site: http://security.research.glam.ac.uk/people/kxynos






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20081123/6c37b07e/attachment.htm>


More information about the erlang-bugs mailing list