Home Software Tutorial Computer Software How to view the underlying source code in Erlang

How to view the underlying source code in Erlang

Apr 21, 2024 am 03:22 AM

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

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>
Copy after login

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>
Copy after login

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>
Copy after login

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1671
14
PHP Tutorial
1276
29
C# Tutorial
1256
24