Delphi ´´½¨Ä¿Â¼¼°Ð´ÈÕÖ¾Îļþ
Delphi ´´½¨Ä¿Â¼¼°Ð´ÈÕÖ¾Îļþ
var
TF: TextFile;
LogFile: string;
txt :string;
sysDir:string;
//´´½¨°´Å¥
procedure TForm1.Button1Click(Sender: TObject);
begin
sysDir:=extractfilepath(application.ExeName );
if not directoryexists(sysdir+'log\') then
createdir(sysdir+'log\');
logfile:=sysdir+'log\'+formatdatetime('yyyymmdd',now)+'.txt';
end;
//дÈÕÖ¾°´Å¥
procedure TForm1.Button2Click(Sender: TObject);
begin
//assignfile(logfile,'log.txt');
AssignFile(tf,logfile);
if fileexists(logfile) then
append(tf)
else
rewrite(tf);
writeln(tf,'123');
closefile(tf);
end;
Ïà¹ØÎĵµ£º
http://meidi152.blog.163.com/blog/static/5423302009610103610744/
1. memo¿Ø¼þ¶ÁÈ¡txt
memo1.Lines.LoadfromFile('E:\*\*.txt');
2.
Procedure NewTxt(FileName:String);
Var
F : Textfile;
Begin
if fileExists(FileName) then DeleteFile(FileName); {¿´ÎļþÊÇ·ñ´æÔÚ,ÔÚ¾Í刪³ý}
AssignFile(F, ......
Format
typeµÄ¿ÉÄÜÖµÓÐÏÂÁÐÕâЩ£º
(1) d ÓзûºÅÊ®½øÖÆÊý
Args±ØÐëÊÇÓзûºÅÕûÐÍÊý¡£Èç¹ûÔÚ¸ñʽ»¯×Ö·û´®Öл¹¼ÓÈëÁË["." prec]£¬ÔòÈç¹ûArgs
µÄ³¤¶ÈÈç¹ûСÓÚ¸ø³öµÄ¾«¶ÈÊýʱ£¬ÔÚǰ±ßÌî²¹0£»Èç¹û´óÓÚ¾«¶ÈÊý£¬°´Êµ¼Ê³¤¶ ......
---
Delphi in a Unicode World Part I: What is Unicode, Why do you need
it, and How do you work with it in Delphi?
By: Nick
Hodges
ÔÎÄÁ´½Ó£ºhttp://dn.codegear.com/article/38437
Abstract: This article discusses Unicode, how Delphi developers
can benefit from using Unicode, and ho ......
delphiÖйú¼Ê»¯µÄ¼¸ÖÖ·½°¸¼°±È½Ï(ת)
Ëæ×ÅÈ«Çò»¯³Ì¶È¼ÓÉÈí¼þÔ½À´Ô½ÏñÆÑ¹«Ó¢£¬µ½´¦Æ®É¢¡¢Ôú¸ù¡£ÕâÆäÖÐÒª½â¾öµÄÊDz»Í¬ÓïÑÔµÄÏÔʾÎÊÌâ¡£ÎÒÃǵ±È»Ï£ÍûÒ»Ì׳ÌÐò£¬¿ÉÒÔ²»Ð޸ĴúÂë¾Í¿ÉÒÔÖ§³Ö²»Í¬µÄÓïÑÔ£¬²»ÒªÈ¥Î¬»¤ºÜ¶àµÄ°æ±¾¡£
Ê×ÏÈҪ̸µ½µÄÒ»¸öÎÊÌâÊÇÂÒÂëÎÊÌ⣬ÒòΪdelphi
wi ......
²»ÂÛÊý×éÔªËØÊÇʲôÀàÐÍ£¬¾²Ì¬Êý×éµÄ¾Ö²¿±äÁ¿×Ü»áÔÚÕ»ÉÏ·ÖÅä¡£Èç¹û¶ÑÕ»´óС²»¹»½«»áµ¼ÖÂÒì³£¡£ÏÂÀý°µ²Ø×ÅÒ»¸öΣÏÕµÄbug
procedure stackover;
var
s:array [0..4100] of string[255];
begin
end;
delphiĬÈÏÕ»×î´óΪ$100000×Ö½Ú£¬ÉÏÀýÖеÄÕ»ÉÏ·ÖÅäµÄ´óÏÀΪ256*4100>$10000¡£²âÊÔ±ØÈ»»á³öÏÖÒì³£Stack overf ......