---
title: "List out the pre-defined Macros in Erlang?"  
description: "List out the pre-defined Macros in Erlang?"  
author: "Sunil Singh"  
published: 2015-09-14  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/22827/list-out-the-pre-defined-macros-in-erlang  
category: "erlang"  
tags: ["otp", "erlang"]  
reading_time: 1 minute  

---

# List out the pre-defined Macros in Erlang?

The pre-defined Macros in Erlang is

• ? Module: It returns the name of the current module\
• ? Module_String: It returns the name of the current module, as a string\
• ? File: It returns the current file name\
• ? Line: It returns the current line number\
• ? Machine: It returns the current machine name, ‘BEAM.’

## Answers

### Answer by Sunil Singh

The pre-defined Macros in Erlang is

• ? Module: It returns the name of the current module\
• ? Module_String: It returns the name of the current module, as a string\
• ? File: It returns the current file name\
• ? Line: It returns the current line number\
• ? Machine: It returns the current machine name, ‘BEAM.’


---

Original Source: https://www.mindstick.com/interview/22827/list-out-the-pre-defined-macros-in-erlang

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
