There are three ways to view the underlying source code in Erlang: 1. Use the erl -s command line option to start the shell; 2. Use the erl_eval command to load the source code directly from the shell; 3. Use the function c:l/1 Load source code at runtime.
How to view the underlying source code in Erlang
For Erlang programmers, viewing the underlying source code is important for understanding Code behavior and debugging issues are critical. This article will introduce three ways to view the underlying source code in Erlang:
1. erl -s
You can use erl -s
Command line option to launch the Erlang shell and view the source code there. For example:
<code>$ erl -serl_eval -s hi</code>
This will start the Erlang shell and load the source code of the hi
module.
2. erl_eval
You can also use the erl_eval
command to load source code directly from the Erlang shell. For example:
<code>$ erl 1> erl_eval(hi).</code>
This command will load the source code of the hi
module and print it to the shell.
3. c:l/1
Finally, you can use the c:l/1
function to load the source code at runtime. This function takes a filename or module name as an argument and loads the source code into the Erlang virtual machine (BEAM). For example:
<code>$ erl 1> c:l("hi").</code>
This command will load the source code of the hi
module and compile it into BEAM.
The above is the detailed content of How to view the underlying source code in Erlang. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor
