Comments

Comments in Erlang start with a percent character (%) and extend to the end of line. There are no block comments.

Note: You’ll often see double percent characters (%%) in code examples. Double percent marks are recognized in the Emacs erlang-mode and enable automatic indentation of commented lines.

 
% This is a comment
 
my_function(Arg1, Arg2) ->
 
case​ f(Arg1) ​of
 
{yes, X} -> ​% it worked
 
..

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.