Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi ¹Ø¼ü×ÖÏê½â

 absolute
//ËüʹµÃÄãÄܹ»´´½¨Ò»¸öбäÁ¿, ²¢ÇҸñäÁ¿µÄÆðʼµØÖ·ÓëÁíÒ»¸ö±äÁ¿Ïàͬ.
var
Str: string[32];
StrLen: Byte absolute Str;
//Õâ¸öÉùÃ÷Ö¸¶¨Á˱äÁ¿StrLenÆðʼµØÖ·ÓëStrÏàͬ.
//ÓÉÓÚ×Ö·û´®µÄµÚ0¸öλÖñ£´æÁË×Ö·û´®µÄ³¤¶È, ËùÒÔStrLenµÄÖµ¼´×Ö·û´®³¤¶È.
begin
Str := 'abc';
Edit1.Text := IntToStr(StrLen);
end;
abstract
//ËüÔÊÐíÄã´´½¨³éÏóµÄ·½·¨, °üÀ¨ÓгéÏó·½·¨µÄÀà³ÆÎª³éÏóÀà.
//Abstract¹Ø¼ü×Ö±ØÐëÓëVirtual»òDynamic¹Ø¼ü×ÖͬʱʹÓÃ, ÒòΪ³éÏó·½·¨±ØÐë±»¸²¸ÇʽʵÏÖ.
//³éÏóÀ಻ÄÜʵÀý»¯, ³éÏó·½·¨²»Äܰüº¬·½·¨Ìå.
type
TDemo = class
private
protected
procedure X; virtual; abstract;
public
constructor Create;
destructor Destroy; override;
published
end;
and
//Ò»¡¢±íʾÂß¼­Óë
if (a>0) and (b>0) then
//¶þ¡¢±íʾλÔËËã
var
a,b,c: Integer;
begin
c := (a and b);
end;
//ʹÓÃAnd±íʾÂß¼­Ê±, And×óÓҵıí´ïʽ±ØÐëÓÃСÀ¨ºÅÀ¨Æð, ÒÔ±ÜÃâÒÔÉúÌõ¼þµÄ³åÍ».
//ÀýÈç:
if a>0 and b>0 then
//±àÒëÆ÷¿ÉÄÜ»áÀí½âΪ:
if a>(0 and b)>0 then
//»ò:
if (a>0) and (b>0) then
//µ«ÊÇʵ¼Ê±àÒëʱ, ±àÒëÆ÷»á²úÉúÒ»¸ö³åÍ», ±¨¸æ´íÎó.
//²¢ÇÒµÚÒ»ÖÖ¿ÉÄܰüº¬ÁËa>b>cµÄÐÎʽ, ÕâÔÚDelphiÖв»±»Ö§³Ö.
//ËùÒÔʹÓÃAndÔËËã·ûʱ±ØÐëʹÓÃÀ¨ºÅ, ÒÔÇø·Ö×óÓÒµÄÌõ¼þ.
//±íʾλÔËËãʱҲ±ØÐë¼ÓÉÏÀ¨ºÅ, ½«AndÒÔ¼°×óÓÒ²ÎÊýÀ¨Æð.
array
//ArrayÓÃÓÚ±íʾÊý×é, ÈκεĶÔÏó¶¼Äܱ»ÉùÃ÷³ÉÊý×é.Êý×é·ÖΪ¾²Ì¬ºÍ¶¯Ì¬µÄ£²ÖÖ.
//¾²Ì¬Êý×é
var
Arr1: array [1..10] of Integer;
//¶¯Ì¬Êý×é, ÓÉÓÚÉùÃ÷ʱ²»ÖªÆäÔªËØ¸öÊý, ËùÒÔ±ØÐëÔÚºóÆÚÓÃSetLength·½·¨ÉèÖÃÊý×éµÄ´óС
var
Arr2: array of Integer;
//Êý×é×÷Ϊ²ÎÊýʱ, ²»ÄÜ´«ÈëÊý×éµÄ´óС, Ö»ÄÜ´«ÈëÊý×éÃû, È»ºóÓÃLength·½·¨»ñÈ¡Êý×éµÄÔªËØ¸öÊý
function X(A: array of Integer): Integer;
var
i: Integer;
begin
Result := 0;
for i := 0 to Length(A)-1 do
Result := Result + A[i];
end;
as
//AsÓÃÓÚ½«Ò»¸ö¶ÔÏóת»»ÎªÁíÒ»¸ö¶ÔÏó
procedure BtnClick(Sender:TObject);
begin
(Sender as TButton).Caption := 'Clicked';
end;
//¶ÔÓÚ¶ÔÏóÌî³ä½Ó¿ÚµÄת»», ±ØÐëÓÃAs½øÐÐ
(HTTPRIO as IExp).GetConnection;
//As²»ÄÜÓÃÓÚÊý¾ÝÀàÐ͵Äת»», ÏÂÃæµÄ´úÂë


Ïà¹ØÎĵµ£º

DelphiÖÐÓÃADOÁ¬½ÓÊý¾Ý¿â

´ËÎÄÊʺÏDelphiÐÂÊÖÔĶÁ£¬ÌرðÊÇÁ¬½ÓÊý¾Ý¿â·½Ã滹һ¶®°ë¶®ÉõÖÁ¸ù±¾²»¶®µÄÐÂÊÖ£»
     --------------------------µ«×ÜÌåÏÔµÃÓеãÂÒ-------------------------
     ±¾ÎÄÕÂÒÔDelphi 7ºÍSQL Server 2000ΪÀý£¬¿Ø¼þÃû¾ùΪϵͳĬÈÏ£¬ÈçUnit1,DataModule1,Edit1,ADOCommand1,ADODataS ......

ʹÓÃDelphiÄÚÖú¯Êý¶ÁдINIÎļþ


ÀûÓÃWindows APIº¯ÊýWritePrivateProfileString ºÍGetPrivateProfileString¿É¶Ô.INIÎļþ½øÐжÁд²Ù×÷¡£Æäʵ£¬¶Ô.INIÎļþµÄ¶ÁдÍêÈ«¿ÉÒÔÀûÓÃDelphiµÄÄÚÖú¯ÊýÀ´ÊµÏÖ¡£ÏÂÃæ¾Í½éÉÜһЩ¶Ô.INIÎļþ¶ÁдʱÏà¹ØµÄÀ༰ÆäÊôÐÔ·½·¨¡£
1¡¢TIniFile¶ÔÏó
ÒÔDelphiÖУ¬¶¨ÒåÁËÒ»¸öTIniFile¶ÔÏ󣬽«.INIÎļþ·â×°ÔÚÆäÖУ¬²¢ÌṩһЩ·½·¨£ ......

Delphi µÄ×Ö·û¼°×Ö·û´®[

Delphi µÄ×Ö·û¼°×Ö·û´®[1] - string¡¢AnsiString¡¢WideString¡¢String[n]¡¢ShortString
2008-10-17 14:57:17
//×î³£ÓÃµÄ string
var
  str: string;   {¶¨Òå}
begin
  str := 'ÍòÒ»'; {¸³Öµ}
  ShowMessage(IntToStr(Length(str))); {³¤¶ÈÊÇ: 4}
end;
//³¤×Ö·û´® AnsiString; ÔÚµ±Ç°°æ± ......

delphi DataSnap³²×´Ö÷´Ó±íʵÏÖ

·þÎñ¶Ë£ºÌí¼ÓADOConnection£¬ADOQuery1£¬ADOQuery2¡£ÉèÖÃADOQuery1ΪÖ÷±í£¬ADOQuery2Ϊ´Ó±í¡£(ͨ¹ý  ADOQuery2.SQL.Text:= 'select * from ´Ó±í where FKID=:Ö÷±íPKID'ÉèÖÃ)¡£Ìí¼ÓDataSetProvider1ºÍDataSetProvider2·Ö±ðÁ¬½Óµ½ADOQuery1ºÍADOQuery2¡£
¿Í»§¶Ë£ºÌí¼ÓClientDataSet1£¬ClientDataSet2¡£ClientDataS ......

DelphiÐ´ÍøÒ³°²È«¿Ø¼þ(dll,ocx)


Unt_Machine_WebDll.pas
BODY {background: #FFFFFF}
A:link { color: #0000FF}
A:visited { color: #0000FF}
A:Active { color: #0000FF}
.bold {font-weight: bold}
.italic {font-style: italic}
.underline {text-decoration: underline}
unit Unt_Machine_WebDll;
{$WARN SYMBOL_PLATFORM OF ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ