The calculator function is a basic feature of Erlang. For example:
text
1> 823+99-2*2.
918
2> 324.81-9.343/2.7.
321.34962962962965
We can quit the Erlang Shell by entering the command q(). Pressing Ctrl+G and then entering 'q' will also exit the Shell. In fact, it will display a menu as follows:
text
3>
User switch command (enter 'h' for help)
--> h
c [nn] - connect to job
i [nn] - interrupt job
k [nn] - kill job
j - list all jobs
s [shell] - start local shell
r [node [shell]] - start remote shell
q - quit erlang
? | h - this message
-->
As we can see, we have more options besides quitting, such as killing jobs, listing all jobs, and so on. You can enter any of the commands listed in the menu to execute the corresponding function.
Top comments (0)