Skip to content

Commit a5ad523

Browse files
author
Stefania
authored
Merge pull request arduino#20 from omendezmorales/patch-4
Translated into Spanish the Modulo page
2 parents ad695f2 + 2cf1d29 commit a5ad523

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
---
22
title: "%"
3-
title_expanded: "modulo"
3+
title_expanded: "Módulo"
44
categories: [ "Structure" ]
5-
subCategories: [ "Arithmetic Operators" ]
5+
subCategories: [ "Operadores Aritméticos " ]
66
---
77

88

99

1010

1111

12-
= % Modulo
12+
= % Módulo
1313

1414

1515
// OVERVIEW SECTION STARTS
1616
[#overview]
1717
--
1818

1919
[float]
20-
=== Description
21-
*Modulo* operation calculates the remainder when one integer is divided by another. It is useful for keeping a variable within a particular range (e.g. the size of an array). The `%` (percent) symbol is used to carry out modulo operation.
20+
=== Descripción
21+
La operación de *Módulo* calcula el residuo que resulta de dividir un entero entre otro. Sirve para mantener una variable dentro de un rango en particular (e.g. el tamaño de un arreglo). El símbolo `%` (porcentaje) se usa para ejecutar la operación de módulo.
2222
[%hardbreaks]
2323

2424

2525
[float]
26-
=== Syntax
26+
=== Sintaxis
2727
[source,arduino]
2828
----
2929
remainder = dividend % divisor;
3030
----
3131

3232
[float]
33-
=== Parameters
34-
`remainder` : variable. *Allowed data types:* int, float, double +
35-
`dividend` : variable or constant. *Allowed data types:* int +
36-
`divisor` : *non zero* variable or constant. *Allowed data types:* int
33+
=== Parámetros
34+
`residuo` : variable. *Tipos de datos permitidos:* int, float, double +
35+
`dividendo` : variable o constante. *Tipos de datos permitidos:* int +
36+
`divisor` : variable o constante *distinta a cero*. *Tipos de datos permitidos:* int
3737
[%hardbreaks]
3838

3939
--
@@ -46,20 +46,20 @@ remainder = dividend % divisor;
4646
--
4747

4848
[float]
49-
=== Example Code
49+
=== Ejemplo
5050

5151
[source,arduino]
5252
----
5353
int x = 0;
54-
x = 7 % 5; // x now contains 2
55-
x = 9 % 5; // x now contains 4
56-
x = 5 % 5; // x now contains 0
57-
x = 4 % 5; // x now contains 4
54+
x = 7 % 5; // x ahora contiene 2
55+
x = 9 % 5; // x ahora contiene 4
56+
x = 5 % 5; // x ahora contiene 0
57+
x = 4 % 5; // x ahora contiene 4
5858
----
5959

6060
[source,arduino]
6161
----
62-
/* update one value in an array each time through a loop */
62+
/* actualizar un valor a la vez en un arreglo mediante un ciclo */
6363
6464
int values[10];
6565
int i = 0;
@@ -69,27 +69,17 @@ void setup() {}
6969
void loop()
7070
{
7171
values[i] = analogRead(0);
72-
i = (i + 1) % 10; // modulo operator rolls over variable
72+
i = (i + 1) % 10; // el operador de módulo cicla sobre la variable
7373
}
7474
----
7575
[%hardbreaks]
7676

7777
[float]
78-
=== Notes and Warnings
79-
The modulo operator does not work on floats.
78+
=== Notas y Precauciones
79+
El operador de módulo no funciona con variables de tipo float.
8080
[%hardbreaks]
8181

8282
--
8383
// HOW TO USE SECTION ENDS
8484

85-
// SEE ALSO SECTION STARTS
86-
[#see_also]
87-
--
88-
89-
[float]
90-
=== See also
9185

92-
[role="language"]
93-
94-
--
95-
// SEE ALSO SECTION ENDS

0 commit comments

Comments
 (0)