Sei sulla pagina 1di 29

PIPEH PSeudo Interprete 1.

Contenido

1. Utilizacion del Entorno

2. Sintaxis del PseudoCodigo

3. Mensajes de Error

4. Acerca de...

Pipeh PSeudo Interprete 1.1 Pagina 1 de 29


1. Utilizacion del entorno

Elementos de la Ventana

< - Barra de Menues


< - Barra de Acceso
Rapido

Area de Trabajo

Informacion de Ejecucion

Menu Archivo

Nuevo: Crea un nue v o algorit m o y escribe el prototi p o basico en el


area de trabaj o .

Pipeh PSeudo Interprete 1.1 Pagina 2 de 29


Abrir: Abre un algorit m o des d e un archi v o en for m at o txt o psc
(texto ascii).
Guardar : Guar da el algorit m o actual con el nom b r e actual
ree m p l a z a n d o al archi vo existe n t e.
Guardar Como : Guar da el algorit m o actual con un nue v o nom b r e.
Salir: Cierra la aplicacion.
Los elem e n t o s 1, 2 y 3 (entre salir y guar d a r como) son los tres
ultimo s archi v o s trabaja d o s. Si el progr a m a se utiliza por prim e r a vez,
esto s no aparec e n en el men u, sino que se agrega r a n cuan d o se abra n o
guar d e n dicho s algorit m o s.

Menu Edicion

Deshacer : Desha c e el ultimo cam bio realizad o al algorit m o. Solo


tiene un nivel.
Cortar, Copiar y Pegar : Interac t u a n entr e el texto del area de
trabajo y el porta p a p e l e s de windo w s.
Seleccionar Todo : Selecciona todo el algorit m o.
Buscar : Localiza una cade n a dent r o del algorit m o. No disting u e
entr e may u s c ul a s y minu s c u l a s.
Buscar Siguiente : Repite la ultim a bus q u e d a realiza d a come n z a n d o
des d e la ubicacio n del curso r.

Menu Ejecucion

Iniciar : Ejecuta el algorit m o en una nue va vent a n a de cons ola.

Pipeh PSeudo Interprete 1.1 Pagina 3 de 29


Si el algorit m o contie n e error e s de sintaxis, no sera ejecut a d o.
Cuand o finaliza actualiza al area de Infor m a ci o n de Ejecucion. La
ejecu cio n pue d e inter r u m p i r s e en cualq uie r mo m e n t o presio n a n d o
Ctrl +P a u s e, aunq u e de esta for m a no se obtie ne infor m a cio n de
ejecu cio n.Ta m p o c o se obitiene la infor m a ci o n de ejecucio n si se cierra
dicha vent a n a des d e su boto n cerra r (la x en la esqui na supe rio r
derec h a). Lo corr ec t o es presio n a r Enter luego de recibir los me ns a j e s de
erro r e s o al finaliza r el progr a m a.

Menu Configuracion

Barra de Acces o Rapido : Muestr a u oculta la barra.


Informacion De Ejecucion : Muestr a u oculta la infor m a ci o n.
Establecer Fuente : Per mite seleccion a r las propie d a d e s de la fuen t e
con la que se mos t r a r a el algorit m o en el area de trabaj o.
Identado : Modifica el funcio n a m i e n t o de las teclas Enter,
BackSpace y Tab para facilitar el ident a d o del codigo en el marge n
izquier d o.

Menu Ayuda

Manual de Usuario : Muestr a el Manual Este Manual.

Pipeh PSeudo Interprete 1.1 Pagina 4 de 29


Manual de Referencia : Muestr a la pagina de refer e n ci a. Dicha
pagin a contie n e un res u m e n de la sinta xis de las instr u ccio n e s y los
opera d o r e s de un algorit m o.
Acerca de...: Muestr a infor m a cio n de la aplicacio n.
Para pode r visualiz a r los man u ale s es neces a rio tener instala d o un
visor de docu m e n t o s PDF. En el CD se prop o r cio n a Adobe Acrob at
Read er.

Informacion de Ejecucion

La Infor m a ci o n de Ejecucio n se actualiz a cada vez que se ejecu t a


el algorit m o.

En ella apar ec e n los error e s encont r a d o s, ya sean de sintaxis


(antes de ejecuta r s e) o erro r e s en tiem p o de ejecucio n. Al hacer click
sobr e los mis m o s, auto m a t ic a m e n t e se selecciona r a la linea que contie n e
dicho error en el area de trabaj o.
Si la ejecucion se inter r u m p e de for m a anor m a l (presio n a n d o
Ctrl +P a u s e o finaliza n d o el proce s o me dia n t e windo w s), dicha
infor m a ci o n no pued e ser actualiz a d a.
A partir de la ver sio n 1.1 se pue d e redi m e n s i o n a r esta area
media n t e el splite r ubica d o entr e dicha area y el area de trabaj o. Notar el
curso r del mou s e como una doble flecha, mant e ni e n d o el boto n
izquier d o apre ta d o pode m o s cam bia r las dime n si o n e s.

Pipeh PSeudo Interprete 1.1 Pagina 5 de 29


Problemas con el Entorno

Debido a que la com u nic acio n entr e el entor n o y el inter p r e t e


pro pia m e n t e dicho se realiza a tra ve z de archivo s tem p o r al e s, es posible
que no funcio n e correct a m e n t e si windo w s no se encue n t r a en
“c:\ wi n d o w s ” Para solucion a r este proble m a, edite el archi v o PseInt.ini
que se encue n t r a en el direct o rio de instalacio n. Si no lo encue n t r a, deb e
crearlo en la carpet a junto a los ejecut a bl e s. En dicho archi v o agreg u e en
cualq uie r lugar una linea como la siguie n t e:
WinDir =E: \ w i n d o w s \
En este ejem pl o, Window s se encue n t r a en la carpe t a “c:\ wi n d o w s.
Notes e que la ruta ter mi n a en “\”. Esto siem p r e debe ser asi. No seria
corr ec t o “e:\ wi n d o w s ”.

Otro posible proble m a, es que al ejecuta r la aplicacio n un men s a j e


indiq u e que no se encon t r o el inter p r e t e. Debe asegu r a r s e de ejecut a r
VPSeInt.exe desd e el directo ri o don d e instalo la aplicacio n. Si inten t o
actu aliz a r el inter p r e t e, cons ult e la docu m e n t a ci o n adju n t a.

Si esto no solucio n a su proble m a, escriba a zas ka r_@hot m a il.co m


y describ a con detalle el erro r en cues tio n.

Pipeh PSeudo Interprete 1.1 Pagina 6 de 29


2. Sintaxis del PseudoCodigo

Consideracione s Previas

Form a gener al de un algorit m o escrito en pse u d o c o d i g o:

Proceso <nombre>
<instruccion 1>;
<instruccion 2>;
<instruccion 3>;
...
FinProceso

Todos los algorit m o s debe n come n z a r con la palabr a Proceso y a


contin u a cio n el nom b r e del mis m o y debe n finaliza r con la palab r a
FinProceso . No pued e habe r instr u c cio n e s fuera del proce s o, aunq u e si
come n t a r i o s.

Las estr uct u r a s no secue n ci ale s pued e anida r s e. Es decir, pued e n


conte n e r otra s ade nt r o, pero la estr uc t u r a conte ni d a debe come n z a r y
finaliza r dentr o de la conte n e d o r a.

Se pue d e n intro d u c i r come n t a r i o s luego de una instr u c cio n o en


lineas sepa r a d a s me dia n t e el uso de la doble barra ( / / ). Todo lo que
prece d e a / / no sera toma d o en cuenta al inter p r e t a r el algorit m o.

Acerca de constantes e identificadores

Los identifica d o r e s debe n cons ta r solo de letras y nu me r o s,


come n z a n d o siem p r e con una letra.

Las const a n t e s de tipo caract e r se escribe n entr e coma s ( ' ).

En las consta n t e s num e r ica s, el punt o ( . ) es el sepa r a d o r


decim al.

Las const a t e s logicas son Verda d e r o y Falso.

Pipeh PSeudo Interprete 1.1 Pagina 7 de 29


Asignacion

<variable> <- <expresion> ;

Prime r o evalua la expr e sio n de la derec h a y luego asigna el


result a d o a la varia ble de la izquie r d a. Deben coincidir en tipo.

Ejemplos :

var<-1; // asigna 1 a var

Acumulador<-Acumulador +1; // incrementa en 1 el


acumulador

Entrada

Leer <variable1> , <variable2> , ... , <variableN> ;

Lee des de el ambie n t e (en este caso el teclado) los valor es y los
asign a a la o las variable s res pec ti v a m e n t e. Puede leer una o mas
variable s.

Ejemplos :

Leer Cantidad;

Leer Valor1,Valor2,Valor3;

Salida

Escribir <expr1> , <expr2> , ... , <exprN> ;

Devuel v e al exterior (en este caso la pant alla) los res ulta d o s de las
expr e si o n e s, o los conte ni d o s de las varia ble s. Tam bie n pude tene r uno
o mas para m e t r o s sepa r a d o s por coma s.

Ejemplos:

Escribir 'Ingrese el nombre:';

Escribir 'Resultado:' , x*2 ;

Pipeh PSeudo Interprete 1.1 Pagina 8 de 29


Dimesionamie nto

Dimesion <identificador1> (<max1>,...,<maxN>) , ... ;

Define un arreglo. Es decir, la cantida d de dime n s i o n e s y el valor


maxi m o de cada una de ellas. Tambie n pued e n declar a r s e mas de un
arreglo en la mis m a linea separ a n d o l o s por coma s. La cantida d de
dime n s i o n e s pued e ser una o mas, y la maxi m a cantida d de eleme n t o s
debe ser una expr e si o n nu m e ric a positiv a. Es neces a ri o definir un
arreglo ante s de utilizarlo. Se pued e n definir mas de un arreglo en una
mis m a instr u c cio n, sepa r a n d o l o s con una coma ( , ).

Ejemplos:

Dimension Alumnos ( 10 ) ;
Leer Alumno (1);

Dimension Tabla ( 10 , 5 , 3 ) , Resultados ( 5 ) ;


...
Escribir Tabla (1,3,2);

Condicional

Si <condicion>
Entonces
...
Sino
...
FinSi

Evalua la condicio n y ejecuta las accione s que corre s p o n d a n ;


Entonces si es ver d a d e r a, Sino si es falsa. Siemp r e debe esta r pres e n t e
Entonces , pero pue d e no apar ece r Sino, y asi no hacer nada en caso de
que la condicio n sea falsa. La condicio n pue de ser una varia ble o una
expr e si o n logica de tipo logica.

Ejemplos :

Condicion<- A>B;
Si Condicion
Entonces Escribir 'Si';

Pipeh PSeudo Interprete 1.1 Pagina 9 de 29


Sino Escribir 'No';
FinSi

Si Cantidad > 10
Entonces
Escribir 'Demasiados articulos.';
Escribir 'Solo se consideraran los 10 primeros.';
FinSi

Seleccion Multiple

Segun <variable> Hacer


A: <...>;
B,C: <...>;
...
De Otro Modo: <...>;
FinSegun

Permite elegir entr e dos o mas posible s grup o s de accione s. Evalua


el conte ni d o de la varia ble y seleccion a el camino a seguir. La varia ble
debe ser de tipo num e r ic o. Las opcione s se delimita n por los dos punt o s
al final. Si un grup o de accione s se debe ejecut a r en dos o mas casos, los
valor es se pued e n poner sepa r a d o s por comas en la mis m a linea. La
opcio n final pued e ser De Otro Modo , y se ejecut a si la varia ble no
coincid e con ningu n a de las anterio r e s.

Ejemplo :

Leer a;
Segun a Hacer
1: Escribir 1;
2: Escribir 2;
3,4: Escribir '3 o 4';
De Otro Modo:
Escribir 'No esta entre 1 y 4';
FinSegun

Mientras Hacer

Mientras <condicion> Hacer


<...>
FinMientras

Pipeh PSeudo Interprete 1.1 Pagina 10 de 29


Ejecuta un grup o de accione s mient r a s la condicion sea ver d a d e r a.
Pued e que no se ejecut e n nunc a, si al mo m e n t o de entr a r en la
estr u c t u r a la condicio n ya es falsa. Debe conte n e r dentr o alguna accio n
que pue d a modificar la condicio n para salir.

Ejemplo :

Escribir 'Ingrese un numero o 0 para salir';


Leer a;
Mientras a<>0 Hacer
Tot<-Tot+a;
Escribir 'Ingrese otro numero o 0 para salir';
FinMientras
Escribir 'Total:',Tot;

Repetir Hasta Que

Repetir
<...>
Hasta Que <condicion>

Ejecuta un grup o de accione s hasta que la condicio n sea


ver d a d e r a. Como la condicio n se evalua al final, siem p r e las accione s
sera n ejecut a d a s al meno s una vez. Debe conte n e r dentr o alguna accio n
que pue d a modificar la condicio n para salir.

Ejemplo :

Repetir
Tot<-Tot+a;
Escribir 'Ingrese un numero o 0 para salir';
Hasta Que a=0
Escribir 'Total:',Tot;

Para

Para <I> <- <VI> Hasta <VF> ( Con Paso <P> ) Hacer
<...>
FinPara

Pipeh PSeudo Interprete 1.1 Pagina 11 de 29


Ejecuta un bloqu e de instr u ccio n e s un deter m i n a d o num e r o de
veces. Al ingre s a r al bloqu e, la variable <I > recibe el valor <VI > y se
ejecu t a n las instr u ccio n e s. Luego incre m e n t a la varia ble <I > en <P > se
evalu a si <I > supe r o a <VF >. Si esto es falso se repite hasta que <I >
sup e r e a <VF >. Si se omite el paso (Con Paso <P >), la varia ble <I > se
incre m e n t a r a en 1.

Ejemplo :

Escribir 'Numeros pares de 10 a 20:';


Para a<-10 Hasta 20 Con Paso 2 Hacer
Escribir a;
FinPara

Operadores

Operador Significado Ejemplo

Relacion ale s
> Mayor que 3>2
< Menor que 'Abc'<'abc'
= Igual que 4=3
<= Menor o igual que 'a'<='b'
>= Mayor o igual que 4>=5
<> Distinto que var1<>var2

Logicos
& Conjuncion ( y ). (7>4) & (2=1) // falso
| Disyuncion ( o ). (7>4) | (2=1) //Verdadero
~ Negacion ( no ). ~(2<5) // falso

Algebr aico s
+ Suma
- Resta
* Multiplicacion
/ Division
ˆ Potenciacion

La jerar q ui a de los opera d o r e s mate m a tic o s es igual a la del


algeb r a, aunq u e pue d e alterar s e media n t e el uso de pare n t e s i s.

Pipeh PSeudo Interprete 1.1 Pagina 12 de 29


Funciones Matematicas

Funcion Significado

RC(X) Raiz Cuadrada de X


ABS(X) Valor Absoluto de X
LN(X) Logaritmo Natural de X
EXP(X) Funcion Exponencial de X
SEN(X) Seno de X
COS(X) Coseno de X
ATAN(X) Arcontangente de X
TRUNC(X) Parte entera de X
REDON(X) Entero mas cercano a X

La funcio n raiz cuadr a d a no debe recibir un argu m e n t o negativ o.


La funcio n expo n e n c ial no debe recibir un argu m e n t o meno r o
igual a cero.

Pipeh PSeudo Interprete 1.1 Pagina 13 de 29


3. Mensajes de Error

Lista de posibles error e s del algorit m o por orde n alfabetico:

Asignacion incompleta.

La causa de este error esta en la ause n cia de alguna de las dos


parte s de una asignacio n, (la variable o la expr e si o n a asigna r).

Ejemplo s :

Para <-3 hasta 5 hacer


a<-;

Caracter no valido.

Se encont r o un caracte r no que no existe en el pse u d o codigo.


Ejemplos: &%#\ ¬°... Estos solo pued e n apar e ce r dent r o de const a n t e s de
tipo caract e r.

Constante o Identificador no valido.

Los identifica d o r e s debe n come n z a r siem p r e con una letra y


pue d e n contin u a r solo con letras o nu m e r o s. No pue d e n ser palabr a s
rese r v a d a s . Tambie n lo pue d e caus ar una cons ta n t e incor r e c ta.

Ejemplo s :

Escribir 1erVar; // No puede empezar con numero


Tot<-Tot+ Primer_Var; // _ no es valido
Escribir 3.4.5; // el nro tiene dos puntos
decimales
Escribir Para; // Para es palabra reservada

Pipeh PSeudo Interprete 1.1 Pagina 14 de 29


Demasidos Parametros

Ocur r e cuan d o una instr u c cio n que admite solo un para m t r o


recibe mas de uno.

Ejemplo :

a<-1,3; // 1 y 3 son dos parametros

Division por cero

Una expr e s io n mate m a t i c a no debe intent a r dividir por cero.

Ejemplo :

a<-0;
...
Escribir 7/a; // 7/a equivale a 7/0 y es imposible.

Entonces mal colocado.

Entonce s siem p r e debe prece d e r a un Si, de lo contr a ri o esta mal


colocad o.

Falta cerrar comillas.

Este error es ocasio n a d o por una cons ta n t e de tipo caracte r


incor r e c t a. Se debe n delimita r con comillas sim ple s ( ' ) tanto el inicio
como el final de la mis m a.

Ejemplo :

Escribir 'Total:,Tot;

Falta cerrar parentesis.

Cuand o en alguna expr e si o n se abre un pare n t e s i s que luego no se


cierra. Se debe n cerrar todos los pare n t e s i s que se abre n.

Ejemplo :

Pipeh PSeudo Interprete 1.1 Pagina 15 de 29


Escribir (3+4/(2*a);

Falta cerrar Si/Para /Mientras /R ep etir /Se gun

Todas las estr uc t u r a s debe n tene r un comie n z o y un final dent r o


del algorit m o. Puede faltar la palabr a FinSi /FinPa r a / F i nMie n t r a s / H a s t a
Que /Fi n Segun o pue de que este mal ubica d a.

Falta condicion.

Las estr uc t u r a s de contr ol repetiti v a s (Mientr a s, Repetir ... Hasta


que) y las condicio n ale s (Si y Segun) requie r e n las condicio n e s que
deter m i n a n la salida del bucle.

Ejemplo s :

Si
Hasta Que
Segun Hacer
Mientras

Falta Hacer.

Las instr u c cio n e s Para, Mientr a s y Segun, debe n ter mi n a r con la


palab r a Hacer.

Ejemplo s :

Para a<-1 hasta c


Segun a

Falta Hasta.

La instr u c cio n para siem p r e debe conte n e r Hasta < valo r final >.

Ejemplo s :

Para a<-1 hacer

Pipeh PSeudo Interprete 1.1 Pagina 16 de 29


Falta nombre de proces o.

Todos los proce s o s debe n come n z a r con la palabr a Proces o y a


contin u a cio n un nom b r e valido para el mis m o.

Ejemplo :

Proceso // aqui se coloca el nombre

Falta punto y coma.

Las accione s secue n ciale s debe m finaliza r siem p r e en punt o y


coma ( ; ).

Ejemplo s :

Escribir 1
Leer a
Dimension b(10)

Faltan Parametros.

Se prod u c e cuan d o se intent a realizar una accion sin los


para m e t r o s mini m o s neces a r io s.

Ejemplo s :

Escribir ; // falta expresion


Leer ; // falta identificador de variable
Dimension ; // falta identificador de arreglo
Para B // falta asignacion, y valor final

Faltan subindices.

En la declar acio n de un arreglo, siem p r e debe n indicar s e las


dime n s i o n e s y sus cantida d e s maxi m a s de eleme n t o s.

Ejemplo :

Dimension C;

Pipeh PSeudo Interprete 1.1 Pagina 17 de 29


FinSegun /FinSi /FinPara /FinMientras /FinProces o / H a sta que mal
colocado

Estas estr uc t u r a s debe n tene r su comie n z o y su final en el mis m o


nievel, es decir que si esta n anida d a s debe n incluir s e com ple t a m e n t e
una dentr o de otra. En el caso del proce s o, es unico y debe ser el
prim e r o en abrir s e y ultim o en cerrar s e.

Identificador no valido.

Los identifica d o r e s debe n come n z a r siem p r e con una letra y


pue d e n contin u a r solo con letras o nu m e r o s. No pue d e n ser palabr a s
rese r v a d a s .

Ejemplo s :

Leer 1erVar; // No puede empezar con numero


Leer Para; // Para es palabra reservada

Instruccion fuera de proceso.

Todas las accione s debe n estar conte ni d a s dent r o del proce s o.


Cualq uier accion poste rio r a la palabr a FinProce s o ocasion a este error.

La instruccion no debe tener parametros

Ocur r e cuan d o una instr u c cio n que no espe r a para m e t r o s los


recibe. FinSi, Repetir, FinPara, FinMient r a s, FinProc es o y FinSegu n no
lleva n para m e t r o s.

Logaritmo de 0 o negativo

No se pue d e calcular el logarit m o de un nu m e r o meno r o igual a


cero.

Pipeh PSeudo Interprete 1.1 Pagina 18 de 29


No coinciden los tipos.

Se prod u c e cuan d o se utilizan variable s, const a n t e s u oper a d o r e s


corr e s p o n d i e n t e s a tipos de datos difere n t e s .

Ejemplo s :

a<-'b';
c<-5+a; // a es caracter
Segun a; // a es caracter

Si 1='3' // '3' es caracter, 1 es numerica

En las instr u ccio n e s Segun y Para la const a n t e s, expr e sio n e s o


variable s debe n ser siem p r e de tipo num e r ico.

No lleva punto y coma.

Las instr uc cio n e s secue n ci ale s (Leer, Escribir, Dime n sio n, <- )
debe n finaliza r con el punt o y coma ( ; ).

Ejemplo s :

Para a<-1 hasta 3 hacer;


Repetir;
si a=1;

Numero de parametros o subindices incorrecto.

Puede ser causa d o por accede r a un elem e n t o de un arreglo


utiliza n d o una cantida d de indices difer e n t e a las dime n si o n e s
declar a d a s o al invoc ar una funcio n mate m a t ic a con mas de un
para m e t r o.

Ejemplo s :

Escribir Cos(20,4); // cos es func. matematica


Dimension a(10,2);
Escribir a(2); // a fue definido como bidimensional

Pipeh PSeudo Interprete 1.1 Pagina 19 de 29


Operador incorrecto.

Se encon t r o un oper a d o r mal ubicad o o desco n o ci d o. Tambie n


ocur r e cuan d o se encue n t r a n dos oper a d o r e s seguido s sin una const a n t e
o variable en medio.

Ejemplo s :

a<-5*/3; // */ dos operadores seguidos


Escribir 5++2; // ++ no es un operador

Parametro nulo.

El para m e t r o no pued e estar vacio.

Ejemplo s :

Escribir a,,2; // el 2do parametro esta vacio


Leer b,; // el 2do parametro esta vacio
Escribir (); // () es un parametro nulo

Raiz de negativo.

Solo se trabaj a con num e r o s dent r o del cam po de los reales, por lo
que no se pue d e calcula r la raiz cuadr a d a de un nu m e r o negativ o.

Se cerraron parentesis demás.

Se prod u c e cuan d o en algun a expr e si o n mate m a t ic a sobr a n


pare n t e s i s.

Ejemplo :

Escribir 2+(2*a)-b);

Pipeh PSeudo Interprete 1.1 Pagina 20 de 29


Se esperaba <opcion >:.

Despu e s de iniciar la estr uc t u r a de seleccion multiple (Segun).


Debe n intro d u c i r s e al meno s una opcion, seguida por dos punto s ( : ) y
luego las accione s a realizar.

Ejemplo s :

Segun a
Escribir b;

Se esperaba asignacion.

La instr u c cio n para siem p r e debe conte n e r la asignacio n que


inicialize la variable de contr ol.

Ejemplo :

Para a hasta 5 hacer

Se esperaba Con Paso o fin de instruccion.

Cuand o en una instr u c cio n para se intro d u c e un para m e t r o (u otra


instr u c cio n) no valido.

Ejemplo s :

Para a<-1 hasta 3 leer a;

Se esperaba entonces.

El condicio n al siem p r e debe tene r una salida por ver d a d e r o.

Ejemplo s :

Si a=1
Sino Escribir 2;
FinSi
// Para evitar este error

Pipeh PSeudo Interprete 1.1 Pagina 21 de 29


// se puede replantear la condicion:
// Ejs: a<>1 ?(a=1)

Se esperaba espacio o coma.

Cuand o se encue n t r a n dos variables o cons ta n t e s consec u ti v a s sin


ning u n sepa r a d o s en medio.

Ejemplo :

Escribir C B; // falta , u operador


Escribir '21' B; // falta ,'u operador
Mientras a='Si'Hacer // Falta espacio

Se esperaba Proceso <nom bre >.

Todos los proce s o s debe n come n z a r con la palabr a Proces o y a


contin u a cio n un nom b r e valido para el mis m o. Todas las accione s debe n
estar conte ni d a s dentr o del proce s o.

Sino mal colocado.

Sino siem p r e debe estar dent r o de un Si, de lo contr a r io esta mal


colocad o.

Subindices fuera de rango

Se prod u c e cuan d o se llama a un eleme n t o de un arreglo ubicad o


en una posicion fuera se las definida s en la instr uc cio n dime n s i o n .

Ejemplo :

Dimension a(5);
...
Escribir a(6); // a solo tiene 5 elementos.

Pipeh PSeudo Interprete 1.1 Pagina 22 de 29


4. Acerca de...

PIPEH Pseudo Interprete v1.1 (b231020 04)

Cualquier pregu n t a, suger e n c i a o come n t a r i o pue de ser envia d o a:


zaskar_@hotmail.com

PseInt fue desa r r o lla d o como pro y e c t o final


para la asign a t u r a Progr a m a c i ó n 1 de la carre r a
Inge nie rí a en Infor m á tica.
Universidad Nacional del Litoral
Facultad de Ingeniería y Ciencias Hídricas
Santa Fe – Argentina – Diciembre de 2003

GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111­1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software­­to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation' s software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you

Pipeh PSeudo Interprete 1.1 Pagina 23 de 29


have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' r eputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone' s free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).

Pipeh PSeudo Interprete 1.1 Pagina 24 de 29


Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program' s
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of

Pipeh PSeudo Interprete 1.1 Pagina 25 de 29


a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine­readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine­readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the

Pipeh PSeudo Interprete 1.1 Pagina 26 de 29


Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients'  exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty­free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will

Pipeh PSeudo Interprete 1.1 Pagina 27 de 29


be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

     END OF TERMS AND CONDITIONS

    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

Pipeh PSeudo Interprete 1.1 Pagina 28 de 29


    <one line to give the program'
s name and a brief idea of what it does.>
    Copyright (C) 19yy  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111­1307  USA

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) 19yy name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'
.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w'  and `show c' s hould show the appropriate


parts of the General Public License.  Of course, the commands you use may
be called something other than `show w'  and `show c'; 
they could even be
mouse­clicks or menu items­­whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision'  (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

Pipeh PSeudo Interprete 1.1 Pagina 29 de 29

Potrebbero piacerti anche