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

Delphi Êý×éºÍ½á¹¹Ìå

¼¼Êõ½»Á÷,DH½²½â. ¼ÇµÃºÜÔç֮ǰÎÒ¾Í˵¹ý,Êý×éºÍ½á¹¹ÌåÔÚÄÚ´æÖÐÆäʵһÑùµÄ,ËûÃǶ¼ÊÇÁ¬Ðø·Ö²¼µÄ.
ÀýÈç: TMyStruct = record
A,B,C:Integer;
end;
T3IntArray = array[0..2]of Integer;
ÕâÁ½¸ö¶¼Õ¼12×Ö½Ú,¶øÇÒTMyStruct.A¾ÍÊÇT3IntArray[0].

¶øÎÒÃÇÖªµÀÔÚ·ÃÎÊÊý×éÖÐij¸öÔªËØµÄʱºò,Ö»ÊÇÔÚµÚÒ»¸öÔªËØµÄµØÖ· + ÐòºÅ * ÔªËØ´óС.

ÄÇô·ÃÎʽṹÌåÓ¦¸ÃÒ²ÊÇÕâÑùµÄ,Ö»ÊǽṹÌåÖÐÿ¸öÔªËØµÄ´óС²»Ò»¶¨¶¼ÊÇÒ»ÑùµÄ,¶øÊý×éÖÐÿ¸öÔªËØ¶¼ÊÇÒ»ÑùµÄ.

ºÃµÄÎÒÃÇÀ´¿´¶Î´úÂë:
type
TMyStruct = record
A,B,C:Integer;
end;
T3IntArray = array[0..2]of Integer;
PMyStruct = ^TMyStruct;
procedure TForm2.Button2Click(Sender: TObject);
var
aArray:array[0..99] of Byte;
P:PMyStruct;
I: Integer;
begin
P:=PMyStruct(@aArray[0]);
for I := 0 to 5 - 1 do
begin
P^.A:=55;
P^.B:=66;
P^.C:=77;
Inc(P);
end;
end;
ÆäʵÕâ¸öPÎÒÃÇÏ൱ÓÚ¶¨ÒåÒ»¸öTMyStructµÄÊý×é,ÓÐ5¸öÔªËØ,µ«ÊÇÎÒÃǶ¨ÒåµÄÊÇÒ»¸öÖ¸Õë,¶øÇÒûÓзÖÅä¿Õ¼ä,ÎÒÊÇÔÚaArrayµÄ¿Õ¼äÉÏÃæÊ¹ÓÃ.

Ò²¾ÍÊǹý³Ì½áÊøµÄʱºò,aArray¿Õ¼ä±»ÊÕ»Ø,ÄÇôPÒ²¾ÍÏûʧÁË.¿´¿´·´»ã±à´úÂë:
utMain.pas.143: P:=PMyStruct(@aArray[0]);
004B6ACB 8BC4 mov eax,esp
utMain.pas.144: for I := 0 to 5 - 1 do
004B6ACD BA05000000 mov edx,$00000005 //Ñ­»·±äÁ¿
utMain.pas.146: P^.A:=55;
004B6AD2 C70037000000 mov [eax],$00000037 //¶ÔA¸³Öµ55
utMain.pas.147: P^.B:=66;
004B6AD8 C7400442000000 mov [eax+$04],$00000042 //¶ÔB¸³Öµ66
utMain.pas.148: P^.C:=77;
004B6ADF C740084D000000 mov [eax+$08],$0000004d //¶ÔC¸³Öµ
utMain.pas.149: Inc(P);
004B6AE6 83C00C add eax,$0c //ÒÆ¶¯Ö¸Õë,Ò»¸öTMyStructµÄ´óСÊÇ3*4=12=$0c
utMain.pas.144: for I := 0 to 5 - 1 do
004B6AE9 4A dec edx
004B6AEA 75E6 jnz $004b6ad2
ºÜÇå³þµÄ¿´µ½ÁË,·ÃÎʺÍÐ޸ĽṹÌåÖÐij¸öÔªËØµÄÖµ,Ò²ÊÇÔڽṹÌåÖ¸ÕëÉÏÃæ½øÐÐÆ«ÒÆ.

ºÃµÄ,ÏÂÒ»´Î¿´¿´Ã¶¾Ù.

·Å¼ÙÁË.ÔÚ¼ÒÃ×ÓÐÍøÁË.ºÃºÃѧϰһÏÂ.


Ïà¹ØÎĵµ£º

Delphi ¾¿¾¹²úÉúÁ˼¸¸öString¶ÔÏóµÄÎÊÌâ

¼¼Êõ½»Á÷,DH½²½â. Õâ¸öÊÇÔÚCSDNÉÏÃæ¿´¼ûµÄÎÊÌâ.ÎÒ˵˵×Ô¼ºµÄÏë·¨. procedure TForm1.btn1Click(Sender: TObject);
var
Str:String;
begin
Str:='abc' ;

Str:=str+'d';

str:=copy(Str,1,3);

str:=UpperCase(str);
end;
ÎÊÌâ1´ð°¸:2010ÏÂ
Unit4.pas.29: begin
005144E0 55 p ......

DelphiÏÂʵÏÖ°üº¬Í¨Åä·ûµÄÎı¾²éÕÒ

±¾ÎÄ×îÔçÔÚ±à³ÌÂÛ̳ÉÏ·¢±í£¬ÎÄÕµØÖ·£ºhttp://programbbs.com/bbs/view12-21351-1.htm£¬Ïà¹ØÎļþ¿ÉÒÔÔÚÉÏÊöµØÖ·µÄÒ³ÃæÖÐÏÂÔØ¡£×ªÔØÊ±Çë×¢Ã÷³ö´¦¡£
Ò»¡¢Ç°ÑÔ
ͨÅä·û¾ÍÊÇÖ¸“*”ºÍ“?”Á½¸ö×Ö·û£¬“*”±íʾµ±Ç°Î»ÖÿÉÒÔûÓлòÕßÓжà¸öÈÎÒâ×Ö·û£»“?”±íʾµ±Ç°Î»ÖÃÓÐÒ»¸öÈÎÒâ×Ö·û¡£ ......

SDL & Object Pascal (Delphi) [2] ÏÔʾÖÐÎÄ×Ö·û

һЩ»ù´¡µÄÎÊÌâÎÒ²»ÔÙ׸ÊöÁË£¬²éÔİïÖúÎĵµ£¨Object Pascal SDL Doc.chm£©ÏÔÈ»±ÈÔÚÕâ¿´ÎÒºú³¶ºÏÊʵöࡣÄÇЩ»­ÏñËØ£¬»ñÈ¡ÏñËØÐÅÏ¢£¬ÏÔʾBMPÎļþ¶àÊýʱºòÖ»Òª°ÑÄÇЩ´úÂë¸´ÖÆ¹ýÀ´»ù±¾¾ÍÄܹ¤×÷¡£ÏÂÃæËµµÄÊÇÔõÑùÏÔʾÖÐÎÄ¡£
ÆäʵSDL¼ÓÉÏttfÖ§³Öʱ£¨ÐèÒª½«¶ÔÓ¦µÄdllÎļþÌí¼Óµ½¹¤³ÌĿ¼ÀÊÇÍêÈ«¿ÉÒÔÏÔʾÖÐÎĵ쬼òÌåºÍ·±Ì嶼ûΠ......

DelphiÖ®Tchart¿Ø¼þʹÓÃÐĵÃ

DelphiÖ®Tchart¿Ø¼þʹÓÃÐĵÃ
    ×î½üÔÚѧϰdelphi£¬×öÒ»¸öÈí¼þÁ·ÊÖ£¬Óõ½Tchart¿Ø¼þ£¬ÓÐЩ´ÖÂÔµÄʹÓÃÐĵ㬹©delphi³õѧÕ߲ο¼¡£
    TChartÊÇdelphiÀïÃæÒ»¸ö±ê×¼µÄͼÐÎÏÔʾ¿Ø¼þ¡£Ëü¿ÉÒÔ¾²Ì¬Éè¼Æ£¨at design time£©Ò²¿ÉÒÔ¶¯Ì¬Éú³É¡£¿ÉÏÂÔØSteema TeeChart 7£¬Ã»ÓÐÔ´´úÂ룬ÄÜÓþͺã¡
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ