RE:como hacer codigos STRING
te explico de nievo necesito q el programa me almacene datos, la unica forma de generarlos es atraves de archivos y la unica forma q conosco es que me genere si o si con un codigo para poder buscarlos e ingresar al mismo t doy un ejemplo de uno q hice
type
exp_Reg=RECORD
codexpediente:integer;
anlexp:string[8];
extracto:string[50];
estado:string[35];
tipo:string[13];
fechai1:string[8];
end;
en este ejemplo para ingresar un expediente es necesario si o si primero ingresar el codigo q es un integer, y mi problema es q yo quiero q se pueda ingresar string para poder poner codigos como E4525 , bueno espero q me aya explicado mejor aca te dejo el procedimientos de altas para q t ilustres mejor
procedure Altaexp;
var
Cod:Integer;
postgf:INTEGER;
Talla:Integer;
teTGf:CHAR;
posTGE:INTEGER;
salida:boolean;
begin
menuCOD;
read(Cod);
while Cod <> 0 do
begin
Talla:= filesize(arc_exp)-1;
if Cod > Talla
then
llenarexp(Cod)
else
begin
Punteroexp (cod);
if reg_exp.codexp = Cod
then
menuerror
else
llenarexp(Cod);
end;
postgf:=1;
gotoxy(20,27);textbackground(blue); TEXTCOLOR(wHITE);
write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
gotoxy(20,28);
write('º ¨ DESEA INGRESAR OTRO EXPTE ? º');
gotoxy(20,29);
write('º º');
gotoxy(20,30);
write('º ');textcolor(yellow);
write(' SI ');textcolor(white);
write(' NO º');
gotoxy(20,31);
write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
textbackground(3);
repeat
teTGf:=readkey;
if teTGf=chr(75) then dec(posTGf);
if teTGf=chr(77) then inc(posTGf);
if posTGf=3 then posTGf:=2;
if posTGE=0 then posTGE:=1;
if posTGf=1 then
begin
textcolor(yellow);
gotoxy(35,30);write('SI');
textcolor(white);
gotoxy(45,30);write('NO');
end;
if posTGf=2 then
begin
textcolor(white);
gotoxy(35,30);write('SI');textcolor(green);
textcolor(yellow);
gotoxy(45,30);write('NO');textcolor(white);
end;
until (teTGf=chr(13));
salida:=false;
if posTGf=1
then
begin
menuCOD;
read(Cod);
END
ELSE
BEGIN
COD:=0;
END;
end;
end;