# 2.3 Comments

> A comment starts with `//` and runs to the end of the line; the engine keeps it but does not run it.

Web page: https://pseudolearn.app/en/spec/lexico/comentarios

> **In one sentence**
>
> A comment starts with `//` and runs to the end of the line; the engine keeps it but does not run it.

## 2.3.1 How it works

A **comment** is a note for the people reading the program. It starts with two slashes, `//`, and ends where the line ends. It can take a whole line or go at the end of an instruction.

**Figure 2.3-1: Where a comment starts**

Two program lines. In the first, what follows the two slashes is shaded and labelled comment. In the second, the two slashes are inside a quoted text and are labelled ordinary text.

Whatever is to the right of the two slashes is a comment up to the end of the line. Inside a quoted text, the slashes are just characters.

### Program: Comments in their place

```pseudolearn
Algorithm Comentarios
  // Calcula el área de un rectángulo
  Define base As Integer <- 4;
  Define altura As Integer <- 3;
  Write base * altura; // 4 por 3
  Write "// esto no es un comentario";
EndAlgorithm
```

**Output**

```text
12
// esto no es un comentario
```

*The program finishes normally.*

The engine does not run comments, but it does not throw them away either: it keeps them so that the editor, the formatter and the profile translator leave them intact.

> **Note**
>
> PseudoLearn only has line comments. There is no comment that opens on one line and closes on another: to comment several lines, each one gets its own `//`.

**In short**
- `//` opens a comment up to the end of the line.
- Inside a quoted text, `//` is ordinary text.
- Comments are kept when formatting and translating.

**See also**
- [2.2 Spaces and line breaks](https://pseudolearn.app/en/spec/lexico/espacios.md)
- [0.5 Syntax profiles: Spanish and English](https://pseudolearn.app/en/spec/lectura/perfiles.md)
