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µÄÌú¸Ë£¬ÔÚÕýʽDelphi2010ÍÆ³öºó£¬ÎÒµ±È»Ò²Òª³¢³¢ÐÂÏÊ£¬Óõç¿ÏÂÀ´ÒÔºó°²×°¡£ºÇºÇ¶þÊ®¶à·ÖÖӾ͸㶨ÁË£¬Æô¶¯Ò²Ìؿ죬¼òµ¥Ê¹ÓÃһϣ¬°ô°ô£¡£¡¿´À´Delphi£¨Ì«ÑôÉñ£©ÓÖ»ØÀ´ÁË£¬ÈçÊÇÎÒ¾ö¶¨Åׯúdelphi2007£¬ÓÃÕâ¸öмһÎÒËùÓõĵÚÈý·½×é¼þÖ÷ÒªÊÇRemObjectsºÍreportbuilder£¬reportbuilder»¹Ã»ÓÐÕÒµ½°²×°forD2009 Ful ......
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; ÔÚµ±Ç°°æ± ......
Ãû³Æ ÀàÐÍ ËµÃ÷
abort º¯Êý ÒýÆð·ÅÆúµÄÒâÍâ´¦Àí
abs º¯Êý ¾ø¶ÔÖµº¯Êý
addexitproc º¯Êý ½«Ò»¹ý³ÌÌí¼Óµ½ÔËÐÐʱ¿âµÄ½áÊø¹ý³Ì±íÖÐ
addr º¯Êý ·µ»ØÖ¸¶¨¶ÔÏóµÄµØÖ·
adjustlinebreaks º¯Êý ½«¸ø¶¨×Ö·û´®µÄÐзָô·ûµ÷ÕûΪcr/lfÐòÁÐ
align Êô ......
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 ......
Ò»¸öºÜ¼òµ¥µÄÎÊÌ⣬µ«ÎÒÆ¾ÎÒѧϰC++/VCÒ»Äê¶à£¬½Ó´¥DelphiµÄʱ¼äÒ²²»¶ÌÁË£¬µ«ÈÔȻд²»³öÀ´¡£
±¾À´ÒÔΪ£¬²»¾ÍÊǽ«Form1.ShowºÍForm1.Hideô£¬µ«È´¾ÍÊÇ´ïµ½²»µ½×Ô¼ºÏëÒªµÄ½á¹û
Õâ¸öÎÊÌâµ¹²»ÓÃ×÷ÉîÈëÑо¿ÁË£¬µ½ÊÇÈÃÎÒ·¢ÏÖ£¬DelphiÒ²²»ÊÇÐÅÊÖÕªÀ´£¬Ê²Ã´¶¼ÊÇÄÇôÈÝÒ׵ģ¬ÒÔΪ×Ô¼ºÓеã¶ùVCµÄµ××Ó£¬¾ÍС¿´ÁËDelphi¡£
×î½üÒ»¶Îʱ ......