 |
|  |
 |
|
Atahualpa
|
 |
Hawthrone
Mar 1999 time: 06:18
|
|
Pascal... 
Tuve un año en escuela de programar en pascal hace ~8 años. Ya tengo unos programas.
por ejemplo (por copy ficheros):
code:
program exe;
uses crt;
var quelle,ziel:file;
anzgelesen,anzgeschrieben:word;
puffer:array[1..2048] of byte;
dname,dname1:string;
ant:char;
begin
textbackground(black);
clrscr;
write('Sourcefile Path and Filename: ');
readln(dname);
assign(quelle,dname);
{$I-}
reset(quelle,1);
{$I+}
if ioresult=0 then
begin
write('Targetfile Path and Filename: ');
readln(dname1);
assign(ziel,dname1);
{$I-}
reset(ziel,1);
{$I+}
if ioresult <> 0 then
begin
rewrite(ziel,1);
writeln(filesize(quelle),' Bytes will be copied!');
repeat
blockread(quelle,puffer,sizeof(puffer),anzgelesen)
;
blockwrite(ziel,puffer,anzgelesen,anzgeschrieben);
until (anzgelesen=0) or (anzgelesen<>anzgeschrieben);
close(quelle);
close(ziel);
end else
begin
write('File exists! Overwrite ');
readln(ant);
if ant = 'j' then
begin
rewrite(ziel,1);
writeln(filesize(quelle),'Bytes will be copied!');
repeat
blockread(quelle,puffer,sizeof(puffer),anzgelesen)
;
blockwrite(ziel,puffer,anzgelesen,anzgeschrieben);
until (anzgelesen=0) or (anzgelesen<>anzgeschrieben);
close(quelle);
close(ziel);
end;
end;
end else writeln('File does not exist!');
readln;
end.
Programé en Delphi también, pero ahora no lo haría. C# es mejor por programas en Windows o probablemente Visual Basic.
|
|
|  |
 |
|  |
 |
|  |
All times are GMT. The time now is 05:18. Apolyton Time is 00:18. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|