Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

2.9. Variables

Variables are used to store values of simple and composite data types. In Erlang, they always start with an uppercase letter,[6] followed by upper- and lowercase letters, integers, and underscores. They may not contain other “special” characters. Examples of variables include the following:

[6] Variables can also begin with an underscore; these play a role in pattern matching and are discussed in Section 2.11.

A_long_variable_name Flag Name2 DbgFlag


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial