Ver Mensaje Individual
  #1  
Antiguo 28-10-2007
joaco joaco is offline
Registrado
 
Registrado: oct 2007
Posts: 2
Reputación: 0
joaco Va por buen camino
Nuevo en BDS, problema con archivos

Buenas gente, soy nuevo en el foro. Me pareció muy interesante toda la informacion que hay y me registré. Hace un tiempo comence a aprender BSD en la facultad y ahora nos piden un programita sencillo en el cual tengo un problema que no se resolver. Antes de borland, estuvimos trabajando con Pascal, para que nos resulte familiar.

Bueno, el tema es que tengo que hacer un programita para gestionar un cajero automatico. Debe tener un archivo de clientes y otro de cuentas de clientes. El problema es que al crear estos archivos, me salen unos errores que no se solucionarlos. A continuacion les paso el codigo, el cual es reciclado de otro programa hecho en Pascal.

Código Delphi [-]
type
    registroclientes = record
        nrocliente:longint;
        nombrecli:string [30];
        clave:longint;
    end;
archivoclientes = file of registroclientes;

type
    registrocuentas = record
        nrocliente:longint;
        nrocuenta:longint;
        monto:longint;
    end;
archivocuentas = file of registrocuentas;

type
    registroempleados = record
        nroempleado:longint;
        nombreemp:string [30];
        clave:longint;
    end;
archivoempleados = file of registroempleados;

begin
  Application.Initialize;
  Application.CreateForm(Tformularioinicio, formularioinicio);
  Application.CreateForm(Tformularioclientes, formularioclientes);
  Application.CreateForm(Tformulariocuenta, formulariocuenta);
  Application.Run;
   assign (archivoclientes ,'c:/cajero/archivoclientes.dat');
        {$I-}
                reset (archivoclientes);
        {$I+}
                if ioresult<>0 then
                        rewrite(archivoclientes);

        assign(archivocuentas,'c:\cajero/archivocuentas.dat');
         {$I-}
                reset (archivocuentas);
         {$I+}
                if ioresult<>0 then
                        rewrite(archivocuentas);
         assign(archivoempleados,'c:\cajero/archivoempleados.dat');
         {$I-}
                reset (archivoempleados);
         {$I+}
                if ioresult<>0 then
                        rewrite(archivoempleados);
                close (archivoempleados);
end.


Estos son los errores:
Cita:
[Pascal Error] cajero.dpr(41): E2029 '(' expected but ',' found
[Pascal Error] cajero.dpr(41): E2008 Incompatible types
[Pascal Error] cajero.dpr(43): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(45): E2066 Missing operator or semicolon
[Pascal Error] cajero.dpr(46): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(48): E2029 ')' expected but identifier 'assign' found
[Pascal Error] cajero.dpr(48): E2029 '(' expected but ',' found
[Pascal Error] cajero.dpr(48): E2008 Incompatible types
[Pascal Error] cajero.dpr(50): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(52): E2066 Missing operator or semicolon
[Pascal Error] cajero.dpr(53): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(54): E2029 ')' expected but identifier 'assign' found
[Pascal Error] cajero.dpr(54): E2029 '(' expected but ',' found
[Pascal Error] cajero.dpr(54): E2008 Incompatible types
[Pascal Error] cajero.dpr(56): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(58): E2066 Missing operator or semicolon
[Pascal Error] cajero.dpr(59): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(60): E2029 ')' expected but identifier 'close' found
[Pascal Error] cajero.dpr(60): E2029 '(' expected but ')' found
[Pascal Error] cajero.dpr(61): E2029 ')' expected but 'END' found

Última edición por dec fecha: 28-10-2007 a las 22:26:34.
Responder Con Cita