Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Manual
Manual
Contenido
3. Mensajes de Error
4. Acerca de...
Pagina 1 de 29
Elementos de la Ventana
< - Barra de Menues < - Barra de Acceso Rapido
Area de Trabajo
Informacion de Ejecucion
Menu Archivo
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
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
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.
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.
Pagina 6 de 29
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.
Pagina 7 de 29
Asignacion <variable> <- <expresion> ; Prime r o evalua la expr e sio n de la derec h a y luego asigna 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 el
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 ;
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';
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
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
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 < Menor que = Igual que <= Menor o igual que >= Mayor o igual que <> Distinto que Logicos & | ~
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.
Pagina 12 de 29
Funciones Matematicas Funcion RC(X) ABS(X) LN(X) EXP(X) SEN(X) COS(X) ATAN(X) TRUNC(X) REDON(X) Significado Raiz Cuadrada de X Valor Absoluto de X Logaritmo Natural de X Funcion Exponencial de X Seno de X Coseno de X Arcontangente de X Parte entera de 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.
Pagina 13 de 29
3. Mensajes de Error
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
Pagina 14 de 29
Demasidos Parametros Ocur r e cuan d o recibe mas de uno. Ejemplo : a<-1,3; // 1 y 3 son dos parametros una instr u c cio n que admite solo un para m t r o
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
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 para m e t r o s mini m o s neces a r io s. Ejemplo s : Escribir ; Leer ; Dimension ; Para B // // // // falta falta falta falta expresion identificador de variable identificador de arreglo asignacion, y valor final realizar una accion sin los
Faltan subindices. En la declar acio n de un arreglo, siem p r e debe n 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; indicar s e las
Pagina 17 de 29
que
mal
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; Leer Para; // No puede empezar con numero // 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.
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, debe n finaliza r con el punt o y coma ( ; ). Ejemplo s : Para a<-1 hasta 3 hacer; Repetir; si a=1; Dime n sio n, <- )
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
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 dems. Se prod u c e pare n t e s i s. Ejemplo : Escribir 2+(2*a)-b); cuan d o en algun a expr e si o n mate m a t ic a sobr a n
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 inicialize la variable de contr ol. Ejemplo : Para a hasta 5 hacer debe conte n e r la asignacio n que
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
Pagina 21 de 29
// //
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.
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.
GNUGENERALPUBLICLICENSE
Version2,June1991 Copyright(C)1989,1991FreeSoftwareFoundation,Inc. 59TemplePlace,Suite330,Boston,MA021111307USA Everyoneispermittedtocopyanddistributeverbatimcopies ofthislicensedocument,butchangingitisnotallowed. Preamble Thelicensesformostsoftwarearedesignedtotakeawayyour freedomtoshareandchangeit.Bycontrast,theGNUGeneralPublic Licenseisintendedtoguaranteeyourfreedomtoshareandchangefree softwaretomakesurethesoftwareisfreeforallitsusers.This GeneralPublicLicenseappliestomostoftheFreeSoftware Foundation' ssoftwareandtoanyotherprogramwhoseauthorscommitto usingit.(SomeotherFreeSoftwareFoundationsoftwareiscoveredby theGNULibraryGeneralPublicLicenseinstead.)Youcanapplyitto yourprograms,too. Whenwespeakoffreesoftware,wearereferringtofreedom,not price.OurGeneralPublicLicensesaredesignedtomakesurethatyou
Pagina 23 de 29
havethefreedomtodistributecopiesoffreesoftware(andchargefor thisserviceifyouwish),thatyoureceivesourcecodeorcangetit ifyouwantit,thatyoucanchangethesoftwareorusepiecesofit innewfreeprograms;andthatyouknowyoucandothesethings. Toprotectyourrights,weneedtomakerestrictionsthatforbid anyonetodenyyoutheserightsortoaskyoutosurrendertherights. Theserestrictionstranslatetocertainresponsibilitiesforyouifyou distributecopiesofthesoftware,orifyoumodifyit. Forexample,ifyoudistributecopiesofsuchaprogram,whether gratisorforafee,youmustgivetherecipientsalltherightsthat youhave.Youmustmakesurethatthey,too,receiveorcangetthe sourcecode.Andyoumustshowthemthesetermssotheyknowtheir rights. Weprotectyourrightswithtwosteps:(1)copyrightthesoftware,and (2)offeryouthislicensewhichgivesyoulegalpermissiontocopy, distributeand/ormodifythesoftware. Also,foreachauthor' sprotectionandours,wewanttomakecertain thateveryoneunderstandsthatthereisnowarrantyforthisfree software.Ifthesoftwareismodifiedbysomeoneelseandpassedon,we wantitsrecipientstoknowthatwhattheyhaveisnottheoriginal,so thatanyproblemsintroducedbyotherswillnotreflectontheoriginal authors'r eputations. Finally,anyfreeprogramisthreatenedconstantlybysoftware patents.Wewishtoavoidthedangerthatredistributorsofafree programwillindividuallyobtainpatentlicenses,ineffectmakingthe programproprietary.Topreventthis,wehavemadeitclearthatany patentmustbelicensedforeveryone' sfreeuseornotlicensedatall. Theprecisetermsandconditionsforcopying,distributionand modificationfollow. GNUGENERALPUBLICLICENSE TERMSANDCONDITIONSFORCOPYING,DISTRIBUTIONANDMODIFICATION 0.ThisLicenseappliestoanyprogramorotherworkwhichcontains anoticeplacedbythecopyrightholdersayingitmaybedistributed underthetermsofthisGeneralPublicLicense.The"Program",below, referstoanysuchprogramorwork,anda"workbasedontheProgram" meanseithertheProgramoranyderivativeworkundercopyrightlaw: thatistosay,aworkcontainingtheProgramoraportionofit, eitherverbatimorwithmodificationsand/ortranslatedintoanother language.(Hereinafter,translationisincludedwithoutlimitationin theterm"modification".)Eachlicenseeisaddressedas"you". Activitiesotherthancopying,distributionandmodificationarenot coveredbythisLicense;theyareoutsideitsscope.Theactof runningtheProgramisnotrestricted,andtheoutputfromtheProgram iscoveredonlyifitscontentsconstituteaworkbasedonthe Program(independentofhavingbeenmadebyrunningtheProgram).
Pagina 24 de 29
WhetherthatistruedependsonwhattheProgramdoes. 1.YoumaycopyanddistributeverbatimcopiesoftheProgram' s sourcecodeasyoureceiveit,inanymedium,providedthatyou conspicuouslyandappropriatelypublishoneachcopyanappropriate copyrightnoticeanddisclaimerofwarranty;keepintactallthe noticesthatrefertothisLicenseandtotheabsenceofanywarranty; andgiveanyotherrecipientsoftheProgramacopyofthisLicense alongwiththeProgram. Youmaychargeafeeforthephysicalactoftransferringacopy,and youmayatyouroptionofferwarrantyprotectioninexchangeforafee. 2.YoumaymodifyyourcopyorcopiesoftheProgramoranyportion ofit,thusformingaworkbasedontheProgram,andcopyand distributesuchmodificationsorworkunderthetermsofSection1 above,providedthatyoualsomeetalloftheseconditions: a)Youmustcausethemodifiedfilestocarryprominentnotices statingthatyouchangedthefilesandthedateofanychange. b)Youmustcauseanyworkthatyoudistributeorpublish,thatin wholeorinpartcontainsorisderivedfromtheProgramorany partthereof,tobelicensedasawholeatnochargetoallthird partiesunderthetermsofthisLicense. c)Ifthemodifiedprogramnormallyreadscommandsinteractively whenrun,youmustcauseit,whenstartedrunningforsuch interactiveuseinthemostordinaryway,toprintordisplayan announcementincludinganappropriatecopyrightnoticeanda noticethatthereisnowarranty(orelse,sayingthatyouprovide awarranty)andthatusersmayredistributetheprogramunder theseconditions,andtellingtheuserhowtoviewacopyofthis License.(Exception:iftheProgramitselfisinteractivebut doesnotnormallyprintsuchanannouncement,yourworkbasedon theProgramisnotrequiredtoprintanannouncement.) Theserequirementsapplytothemodifiedworkasawhole.If identifiablesectionsofthatworkarenotderivedfromtheProgram, andcanbereasonablyconsideredindependentandseparateworksin themselves,thenthisLicense,anditsterms,donotapplytothose sectionswhenyoudistributethemasseparateworks.Butwhenyou distributethesamesectionsaspartofawholewhichisaworkbased ontheProgram,thedistributionofthewholemustbeonthetermsof thisLicense,whosepermissionsforotherlicenseesextendtothe entirewhole,andthustoeachandeverypartregardlessofwhowroteit. Thus,itisnottheintentofthissectiontoclaimrightsorcontest yourrightstoworkwrittenentirelybyyou;rather,theintentisto exercisetherighttocontrolthedistributionofderivativeor collectiveworksbasedontheProgram. Inaddition,mereaggregationofanotherworknotbasedontheProgram withtheProgram(orwithaworkbasedontheProgram)onavolumeof
Pagina 25 de 29
astorageordistributionmediumdoesnotbringtheotherworkunder thescopeofthisLicense. 3.YoumaycopyanddistributetheProgram(oraworkbasedonit, underSection2)inobjectcodeorexecutableformunderthetermsof Sections1and2aboveprovidedthatyoualsodooneofthefollowing: a)Accompanyitwiththecompletecorrespondingmachinereadable sourcecode,whichmustbedistributedunderthetermsofSections 1and2aboveonamediumcustomarilyusedforsoftwareinterchange;or, b)Accompanyitwithawrittenoffer,validforatleastthree years,togiveanythirdparty,forachargenomorethanyour costofphysicallyperformingsourcedistribution,acomplete machinereadablecopyofthecorrespondingsourcecode,tobe distributedunderthetermsofSections1and2aboveonamedium customarilyusedforsoftwareinterchange;or, c)Accompanyitwiththeinformationyoureceivedastotheoffer todistributecorrespondingsourcecode.(Thisalternativeis allowedonlyfornoncommercialdistributionandonlyifyou receivedtheprograminobjectcodeorexecutableformwithsuch anoffer,inaccordwithSubsectionbabove.) Thesourcecodeforaworkmeansthepreferredformoftheworkfor makingmodificationstoit.Foranexecutablework,completesource codemeansallthesourcecodeforallmodulesitcontains,plusany associatedinterfacedefinitionfiles,plusthescriptsusedto controlcompilationandinstallationoftheexecutable.However,asa specialexception,thesourcecodedistributedneednotinclude anythingthatisnormallydistributed(ineithersourceorbinary form)withthemajorcomponents(compiler,kernel,andsoon)ofthe operatingsystemonwhichtheexecutableruns,unlessthatcomponent itselfaccompaniestheexecutable. Ifdistributionofexecutableorobjectcodeismadebyoffering accesstocopyfromadesignatedplace,thenofferingequivalent accesstocopythesourcecodefromthesameplacecountsas distributionofthesourcecode,eventhoughthirdpartiesarenot compelledtocopythesourcealongwiththeobjectcode. 4.Youmaynotcopy,modify,sublicense,ordistributetheProgram exceptasexpresslyprovidedunderthisLicense.Anyattempt otherwisetocopy,modify,sublicenseordistributetheProgramis void,andwillautomaticallyterminateyourrightsunderthisLicense. However,partieswhohavereceivedcopies,orrights,fromyouunder thisLicensewillnothavetheirlicensesterminatedsolongassuch partiesremaininfullcompliance. 5.YouarenotrequiredtoacceptthisLicense,sinceyouhavenot signedit.However,nothingelsegrantsyoupermissiontomodifyor distributetheProgramoritsderivativeworks.Theseactionsare prohibitedbylawifyoudonotacceptthisLicense.Therefore,by modifyingordistributingtheProgram(oranyworkbasedonthe
Pagina 26 de 29
Program),youindicateyouracceptanceofthisLicensetodoso,and allitstermsandconditionsforcopying,distributingormodifying theProgramorworksbasedonit. 6.EachtimeyouredistributetheProgram(oranyworkbasedonthe Program),therecipientautomaticallyreceivesalicensefromthe originallicensortocopy,distributeormodifytheProgramsubjectto thesetermsandconditions.Youmaynotimposeanyfurther restrictionsontherecipients' exerciseoftherightsgrantedherein. Youarenotresponsibleforenforcingcompliancebythirdpartiesto thisLicense. 7.If,asaconsequenceofacourtjudgmentorallegationofpatent infringementorforanyotherreason(notlimitedtopatentissues), conditionsareimposedonyou(whetherbycourtorder,agreementor otherwise)thatcontradicttheconditionsofthisLicense,theydonot excuseyoufromtheconditionsofthisLicense.Ifyoucannot distributesoastosatisfysimultaneouslyyourobligationsunderthis Licenseandanyotherpertinentobligations,thenasaconsequenceyou maynotdistributetheProgramatall.Forexample,ifapatent licensewouldnotpermitroyaltyfreeredistributionoftheProgramby allthosewhoreceivecopiesdirectlyorindirectlythroughyou,then theonlywayyoucouldsatisfybothitandthisLicensewouldbeto refrainentirelyfromdistributionoftheProgram. Ifanyportionofthissectionisheldinvalidorunenforceableunder anyparticularcircumstance,thebalanceofthesectionisintendedto applyandthesectionasawholeisintendedtoapplyinother circumstances. Itisnotthepurposeofthissectiontoinduceyoutoinfringeany patentsorotherpropertyrightclaimsortocontestvalidityofany suchclaims;thissectionhasthesolepurposeofprotectingthe integrityofthefreesoftwaredistributionsystem,whichis implementedbypubliclicensepractices.Manypeoplehavemade generouscontributionstothewiderangeofsoftwaredistributed throughthatsysteminrelianceonconsistentapplicationofthat system;itisuptotheauthor/donortodecideifheorsheiswilling todistributesoftwarethroughanyothersystemandalicenseecannot imposethatchoice. Thissectionisintendedtomakethoroughlyclearwhatisbelievedto beaconsequenceoftherestofthisLicense. 8.Ifthedistributionand/oruseoftheProgramisrestrictedin certaincountrieseitherbypatentsorbycopyrightedinterfaces,the originalcopyrightholderwhoplacestheProgramunderthisLicense mayaddanexplicitgeographicaldistributionlimitationexcluding thosecountries,sothatdistributionispermittedonlyinoramong countriesnotthusexcluded.Insuchcase,thisLicenseincorporates thelimitationasifwritteninthebodyofthisLicense. 9.TheFreeSoftwareFoundationmaypublishrevisedand/ornewversions oftheGeneralPublicLicensefromtimetotime.Suchnewversionswill
Pagina 27 de 29
besimilarinspirittothepresentversion,butmaydifferindetailto addressnewproblemsorconcerns. Eachversionisgivenadistinguishingversionnumber.IftheProgram specifiesaversionnumberofthisLicensewhichappliestoitand"any laterversion",youhavetheoptionoffollowingthetermsandconditions eitherofthatversionorofanylaterversionpublishedbytheFree SoftwareFoundation.IftheProgramdoesnotspecifyaversionnumberof thisLicense,youmaychooseanyversioneverpublishedbytheFreeSoftware Foundation. 10.IfyouwishtoincorporatepartsoftheProgramintootherfree programswhosedistributionconditionsaredifferent,writetotheauthor toaskforpermission.ForsoftwarewhichiscopyrightedbytheFree SoftwareFoundation,writetotheFreeSoftwareFoundation;wesometimes makeexceptionsforthis.Ourdecisionwillbeguidedbythetwogoals ofpreservingthefreestatusofallderivativesofourfreesoftwareand ofpromotingthesharingandreuseofsoftwaregenerally. NOWARRANTY 11.BECAUSETHEPROGRAMISLICENSEDFREEOFCHARGE,THEREISNOWARRANTY FORTHEPROGRAM,TOTHEEXTENTPERMITTEDBYAPPLICABLELAW.EXCEPTWHEN OTHERWISESTATEDINWRITINGTHECOPYRIGHTHOLDERSAND/OROTHERPARTIES PROVIDETHEPROGRAM"ASIS"WITHOUTWARRANTYOFANYKIND,EITHEREXPRESSED ORIMPLIED,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSE.THEENTIRERISKAS TOTHEQUALITYANDPERFORMANCEOFTHEPROGRAMISWITHYOU.SHOULDTHE PROGRAMPROVEDEFECTIVE,YOUASSUMETHECOSTOFALLNECESSARYSERVICING, REPAIRORCORRECTION. 12.INNOEVENTUNLESSREQUIREDBYAPPLICABLELAWORAGREEDTOINWRITING WILLANYCOPYRIGHTHOLDER,ORANYOTHERPARTYWHOMAYMODIFYAND/OR REDISTRIBUTETHEPROGRAMASPERMITTEDABOVE,BELIABLETOYOUFORDAMAGES, INCLUDINGANYGENERAL,SPECIAL,INCIDENTALORCONSEQUENTIALDAMAGESARISING OUTOFTHEUSEORINABILITYTOUSETHEPROGRAM(INCLUDINGBUTNOTLIMITED TOLOSSOFDATAORDATABEINGRENDEREDINACCURATEORLOSSESSUSTAINEDBY YOUORTHIRDPARTIESORAFAILUREOFTHEPROGRAMTOOPERATEWITHANYOTHER PROGRAMS),EVENIFSUCHHOLDEROROTHERPARTYHASBEENADVISEDOFTHE POSSIBILITYOFSUCHDAMAGES. ENDOFTERMSANDCONDITIONS HowtoApplyTheseTermstoYourNewPrograms Ifyoudevelopanewprogram,andyouwantittobeofthegreatest possibleusetothepublic,thebestwaytoachievethisistomakeit freesoftwarewhicheveryonecanredistributeandchangeundertheseterms. Todoso,attachthefollowingnoticestotheprogram.Itissafest toattachthemtothestartofeachsourcefiletomosteffectively conveytheexclusionofwarranty;andeachfileshouldhaveatleast the"copyright"lineandapointertowherethefullnoticeisfound.
Pagina 28 de 29
<onelinetogivetheprogram' snameandabriefideaofwhatitdoes.> Copyright(C)19yy<nameofauthor> Thisprogramisfreesoftware;youcanredistributeitand/ormodify itunderthetermsoftheGNUGeneralPublicLicenseaspublishedby theFreeSoftwareFoundation;eitherversion2oftheLicense,or (atyouroption)anylaterversion. Thisprogramisdistributedinthehopethatitwillbeuseful, butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe GNUGeneralPublicLicenseformoredetails. YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware Foundation,Inc.,59TemplePlace,Suite330,Boston,MA021111307USA Alsoaddinformationonhowtocontactyoubyelectronicandpapermail. Iftheprogramisinteractive,makeitoutputashortnoticelikethis whenitstartsinaninteractivemode: Gnomovisionversion69,Copyright(C)19yynameofauthor GnomovisioncomeswithABSOLUTELYNOWARRANTY;fordetailstype`s howw' . Thisisfreesoftware,andyouarewelcometoredistributeit undercertainconditions;type` showc' fordetails. Thehypotheticalcommands`s howw' and` showc's ouldshowtheappropriate h partsoftheGeneralPublicLicense.Ofcourse,thecommandsyouusemay becalledsomethingotherthan` showw' and` showc'; theycouldevenbe mouseclicksormenuitemswhateversuitsyourprogram. Youshouldalsogetyouremployer(ifyouworkasaprogrammer)oryour school,ifany,tosigna"copyrightdisclaimer"fortheprogram,if necessary.Hereisasample;alterthenames: Yoyodyne,Inc.,herebydisclaimsallcopyrightinterestintheprogram ` Gnomovision' (whichmakespassesatcompilers)writtenbyJamesHacker. <signatureofTyCoon>,1April1989 TyCoon,PresidentofVice ThisGeneralPublicLicensedoesnotpermitincorporatingyourprograminto proprietaryprograms.Ifyourprogramisasubroutinelibrary,youmay consideritmoreusefultopermitlinkingproprietaryapplicationswiththe library.Ifthisiswhatyouwanttodo,usetheGNULibraryGeneral PublicLicenseinsteadofthisLicense.
Pagina 29 de 29