Then you use GOTO statement in the year 2011! You never read the classic paper by Dijkstra (“GOTO considered harmful”) it is the reason Then anything else! This is stinking bad programming in any language. One time it might be a sine function, the next an auto tag validation, and It is the awful, awful design practice of changing how a nodule of code works by external modules via flags. Had a software engineering course, or you would know about flag coupling. TRIGGER is a reserved word that thing is a flag! Even worse, it is control flag. This is a total mess, and just because the SQL is bad. * End the ad-hoc variable pass section */. IF = 1 GOTO GODATE_1 - Redundant, yes, but it works for me * This is the top part where I will occasionally pass in a different variable - uncomment to get a / prevent a failure */. Typically I am getting the error that I have previously defined my local variable, but if I do not do this step then I get the 'I need to define the local variable' Out how to use try-catch, GOTO, if-then-else or other such methods to achieve this. Most of the time I will just run the bottom of the proceedure, but there will be time in which I want to pass in an alternative variable. Hello, I am trying to write a proceedure that I will call from outside of SQL. Program Materiales uses crt type RegSal = record Nomb : string Cant : string Est : string end const Tec = Tec1 = var Sec1 : file of char // secuencia de entrada v : char i : integer Sal : file of char // secuencia de salida CdUs : integer CdUs_1, CdUs_2, CdUs_3, CdUs_4, CdUs_5 : integer Res_1, Res_2, Res_3, Res_4, Res_5 : integer contB, contL, contP, contF : integer Nom : string Can : string Es : string ArchSal : file of RegSal Arch : RegSal function chartoint (n :char ) :integer begin case (n ) of '1' : exit (1 ) '2' : exit (2 ) '3' : exit (3 ) '4' : exit (4 ) '5' : exit (5 ) '6' : exit (6 ) '7' : exit (7 ) '8' : exit (8 ) '9' : exit (9 ) '0' : exit (0 ) end end begin assign (Sec1, 'D : \TrabajoPascal \Datos \SecuenciaEntrada. Generar un archivo de salida con los nombres clave, cantidad y estado de los materiales de tipo 'L' con codigo igual a uno ingresado por el usuario. Informar por pantalla la cantidad de los diferentes materiales de cada tipo de tecnologia. Generar una secuencia de salida que contenga los materiales de tecnologia 'L' y 'F'. La empresa que comercializa articulos para la construccion SRL desea obtener un infrome de sus materiales para contruccion guardados en antiguas secuencias.Por ello se le pide a usted que realice un programa en pascal que permita solucionar su problema.Ĭuentan con una secuencia de caracteres que contiene el codigo del material (5 caracteres), un caracter que indica su tecnologia ('B', 'L', 'P', 'F'), el nombre clave del mismo (finaliza con #, maximo de 30 caracteres) la cantidad que se posee (3 digitos) y su estado (100 caracteres, con espacios en blancos en caso de que sobren). Como es la primera vez que programamos seguro que estamos haciendo muchas cosas mal. Buenas, soy estudiante y estoy haciendo un taller de pascal, con mis compañeros hicimos este codigo que aparentemente no tiene ningun error, pero cuando se ejecuta y se ingresa el codigo el programa se cierra.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |