自定义function 如下:function fb(MinInt:integer;MaxInt:integer;CountInt:integer):boolean;
var i:integer;
begin
if fileopen(filename,fmOpenWrite)>0 then
begin
for i:=0 to countint-1 do
WriteInteger(MinInt);
for i:=0 to countint-1 do
WriteInteger(MaxInt);
fb:=true;
end
else
fb:=false; end;
每行写入一个数字,将minint写入countint次,将maxintt写入countint次,返回一个boolean表示写入是否成功
var i:integer;
begin
if fileopen(filename,fmOpenWrite)>0 then
begin
for i:=0 to countint-1 do
WriteInteger(MinInt);
for i:=0 to countint-1 do
WriteInteger(MaxInt);
fb:=true;
end
else
fb:=false; end;
每行写入一个数字,将minint写入countint次,将maxintt写入countint次,返回一个boolean表示写入是否成功
解决方案 »
- 动态创建 TTabSheet 的疑问
- 30元人民币求解决方法,WebBrowser1.OleObject.document.links.item(i).Click [在线等,第一个解决的留下支付宝]
- 我怎樣點擊button後,DBGrid最末一行的後面再加一新行,再點擊再加新行,再點再加?
- SOCKET,请高手指点,如果知道接受到服务端数据!!!!
- 可变参数讨论,纯粹技术!
- 一个简单的小问题!在线等候.......
- 设置邮件默认程序!!!
- Delphi中使用MiDi风格窗口时主窗体不是MiDi风格出错
- 如何解决InstallShield不能支持中文
- 请教各位大虾了:如何备份数据库?
- 什么是三层数据库!!
- 怎样利用软件在已知的网站自动注册,登陆并发布供求信息,并在其中搜索关键字,郁闷!
const
sLogDir = '\Log\';
var
strFile: String;
strTemp: WideString;
tFile: TextFile;
begin
strFile := ExtractFileDir(Application.ExeName)+sLogDir+FormatDateTime('yyyymmdd',Date())+'.txt';
AssignFile(tFile,strFile); if not DirectoryExists(sLogDir) then
if not CreateDir(sLogDir) then
raise Exception.Create('Cannot create '+sLogDir); try
if FileExists(strFile) then
Append(tFile)
else
ReWrite(tFile);
strTemp := Format('%s',
[Trim(myLog)]);
Writeln(tFile,strTemp);
finally
CloseFile(tFile);
end;
end;