Variables

We can store the result of a command in a variable.

 
1>​ X = 123456789.
 
123456789

In the first line we gave a value to the variable X; in the next line the shell prints the value of the variable.

Note that all variable names must start with an uppercase letter.

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.