Sign in Join
Wiki copytemporary

Var/es: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Var/es

OldNewLine
1+[[Keyword|Palabra reservada]] que se utiliza para marcar la sección, en que las [[Variable|variables]] y el [[Type|tipo]] a que pertenecen se declaran.
2+
3+   En la declaración de parámetros de un [[Procedure|procedimiento]] o [[Function|función]] la palabra **var** marca el parametro como un [[Variable parameter/es|parámetro variable]].
4+
5+   Las variables se declaran al principio del [[Program|programa]], procedimiento, [[Function|función]] o [[Unit|unidad]].
6+
7+   La declaración de una variable consta de dos partes: primero, el nombre asignado a la variable, seguido de [[Colon|dos puntos (:)]]. Segundo el [[Type|tipo]] de la variable, seguida de [[Semicolon|punto y coma (;)]].
8+
9+``` pascal
10+ ...
11+ var
12+ edad : integer ;
13+ ...
14+```
15+
16+   Si vamos a utilizar varias variables de un cierto tipo, podemos declararlas, poniendo sus nombres, separados por una [[Comma|coma (,)]] en la primera parte.
17+
18+``` pascal
19+ ...
20+ var
21+ hombre, mujer : persona ;
22+ ...
23+```
24+
25+## Leer también
26+
27+- [[Local variables/es|Variables locales]]
28+- [[Global variables]]
29+- [[doc:/ref/refse19.html|Variable declaration]]
30+- [[doc:/ref/refse21.html|Thread Variables]]
31+- \[<http://www.cs.joensuu.fi/~saja/var_roles/>\| The Roles of Variables\]
32+
33+---
34+*From the Free Pascal wiki, page "Var/es", as it stood on 2020-03-03 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history