Professional Documents
Culture Documents
1 CÓDIGO
1.2 BLOQUE
1.2.1 DECLARACIONES
1.2.2 SENTENCIAS
1.2.2.2 SIMPLES
1.2.2.2.1DE ASIGNACIÓN........... :=
1.2.2.3 ESTRUCTURADAS
1.2.2.3.4WITH
Página 1
MÁRQUEZ NORBERTO RUBÉN
ANALISTA DE SISTEMAS DE COMPUTACIÓN
E s tr u c tu r a d e u n P r o g r a m a F e n te
L in e a s d e C ó d i g o
E n c a b e z a m ie n t o
p r o g r a m n o m b r e ( in p u t ,o u t p u t ,a r c h iv o ) ;
B lo q u e
D e c la r a c i o n e s
D e f in ic ió n d e C o n s t a n t e s
S e n t e n c ia s
b e g in
s im p le s
d e a s ig n a c i ó n
:=
d e p r o c e d im in e t o
re a d y w rite
E s tr u c tu r a d a
C í c lic a s
w h ile / u n til / fo r
C o n d i c i o n a le s
if / c a s e
end
Página 2
MÁRQUEZ NORBERTO RUBÉN
ANALISTA DE SISTEMAS DE COMPUTACIÓN
ASIGNACIÓN
I:=0;
I=0
read(N);
N=? read(N,O,P);
write(N);
writeln(N);
?N writeln(N);
page;
write(N:n:n);
SENTENCIAS REPETITIVAS
for I := 1 to 3 do sentencias;
F
I1a3x1
for I := 3 downto 1 do sentencias;
SENTENCIAS CONDICIONALES
Página 3
MÁRQUEZ NORBERTO RUBÉN
ANALISTA DE SISTEMAS DE COMPUTACIÓN
case var of
1 : sentencias;
var = 1 var = 2 var = 3 2 : sentencias;
3 : sentencias
end
LECTURA DE ARCHIVOS
1º reset(archivo)
leer archivo
2º get(archivo)
leer archivo
DEFINICIÓN DE REGISTROS
type
Defino nombre-de-registro=record
Registro campo1:tipo;
campo2:tipo;
campon:tipo
end;
DEFINICIÓN DE ARCHIVOS
Defino
Archivo
var
nom-de-archivo: file of nom-de-registro;
Página 4