全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1555
推到 Plurk!
推到 Facebook!

開檔問題...........

 
supermen
一般會員


發表:5
回覆:2
積分:1
註冊:2002-04-28

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-04-29 03:11:49 IP:202.178.xxx.xxx 未訂閱
請問下面那段程式碼要如何修正?才能正常compiler.. 程式碼如下: ------------------------------------------------- if fileopen('c:\abc.text',fmopenread) > 0 then begin assignfile(infile,'c:\abc.text'); reset(infile); readln(infile,instring); end else showmessage('檔案不存在'); compiler訊息如下: -------------------------------------------------------------- project project1.exe raised exception class EInOutError with message 'I/O error 32'.Process stopped.Use Step or Run to continue.
領航天使
站長


發表:12216
回覆:4186
積分:4084
註冊:2001-07-25

發送簡訊給我
#2 引用回覆 回覆 發表時間:2002-04-29 08:38:59 IP:61.219.xxx.xxx 未訂閱
引言: 請問下面那段程式碼要如何修正?才能正常compiler.. 程式碼如下: ------------------------------------------------- if fileopen('c:\abc.text',fmopenread) > 0 then begin assignfile(infile,'c:\abc.text'); reset(infile); readln(infile,instring); end else showmessage('檔案不存在'); compiler訊息如下: -------------------------------------------------------------- project project1.exe raised exception class EInOutError with message 'I/O error 32'.Process stopped.Use Step or Run to continue.
用以下指令代替 if fileexists('abc.txt') then showmessage('找到') else showmessage('不存在'); ~~~Delphi K.Top討論區站長~~~
------
~~~Delphi K.Top討論區站長~~~
weber
初階會員


發表:24
回覆:56
積分:26
註冊:2002-03-13

發送簡訊給我
#3 引用回覆 回覆 發表時間:2002-04-29 15:17:20 IP:61.216.xxx.xxx 未訂閱
if FileExists('c:\abc.txt') then begin assignfile(infile,'c:\abc.text'); try reset(infile); readln(infile,instring); finally closefile(infile); end; end else showmessage('檔案不存在');
系統時間:2024-04-26 8:08:56
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!