Câu hỏi

26/04/2013 21:34
Chuyển file Pas thành txt
Trong Pascal MÌnh có biết cách chuyển file Txt thành file Pas bằng cách lưu txt dưới dạng tên.Pas nhưng bây giờ mình có file .Pas và muốn chuyển nó về txt để copy thì phải làm thế nào?
ngocanh
26/04/2013 21:34
ngocanh
26/04/2013 21:34
TungNo1
26/04/2013 21:34
![[:D]](/images/wys/yahoo_bigsmile.gif)
Danh sách câu trả lời (3)

Đây nè bạn,
var
f: text;
filename: string;
buf: string;
begin
Write('Nhập tên file: '); Readln(filename);
Assign(f, filename);
Reset(f);
while not eof(f) do
begin
Readln(f, buf);
Writeln(buf);
end;
Close(f);
end.
----------------------
Cho mình bổ sung chút nha
uses crt;
var
f: text;
Buf,filename: string;
i:integer;
begin
Write('Nhập tên file: '); Readln(filename);
Assign(f, filename);
Reset(f);
i:=0;
while not eof(f) do
begin
{neu chan vi van ban dai qua thi esc de thoat}
if Keypressed then if readkey=#27 then break;
Readln(f, buf);
Writeln(buf);
inc(i);
if (i mod 24 =0) then readln; {cho dung man hinh lai ay ma}
end;
Close(f);
end.
var
f: text;
filename: string;
buf: string;
begin
Write('Nhập tên file: '); Readln(filename);
Assign(f, filename);
Reset(f);
while not eof(f) do
begin
Readln(f, buf);
Writeln(buf);
end;
Close(f);
end.
----------------------
Cho mình bổ sung chút nha
uses crt;
var
f: text;
Buf,filename: string;
i:integer;
begin
Write('Nhập tên file: '); Readln(filename);
Assign(f, filename);
Reset(f);
i:=0;
while not eof(f) do
begin
{neu chan vi van ban dai qua thi esc de thoat}
if Keypressed then if readkey=#27 then break;
Readln(f, buf);
Writeln(buf);
inc(i);
if (i mod 24 =0) then readln; {cho dung man hinh lai ay ma}
end;
Close(f);
end.

Hix, ko có cái mình cần ~.~

bạn vào clink này tìm thử xem nhen , có nhiều phần mềm đỗi đuôi trong này lắm đó từ từ tham khảo http://www.ddth.org/forum/search.html?b=8&q=%C4%91u%C3%B4i&page=12&page=4&page=2&page=1&page=2&page=3
Trả lời câu hỏi
Câu hỏi lĩnh vực Lập trình
Rao vặt Siêu Vip