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

DELPHI²ÎÊý¼¸¸ö¸ÅÄîÉϵÄÇø±ð ÊÕ²Ø

DELPHI²ÎÊý¼¸¸ö¸ÅÄîÉϵÄÇø±ð ÊÕ²Ø
 ÒýÓòÎÊý£º
ÒýÓòÎÊýÓÃvar¹Ø¼ü×Ö±êʾ
procedure DoubleTheValue (var Value: Integer);
begin
  Value := Value * 2;
end;ÔÚÕâÖÖÇé¿öÏ£¬²ÎÊý¼È°ÑÒ»¸öÖµ´«µÝ¸ø¹ý³Ì£¬ÓÖ°ÑÐÂÖµ·µ»Ø¸øµ÷Óùý³ÌµÄ´úÂë¡£µ±ÄãÖ´ÐÐÍêÒÔÏ´úÂëʱ£º
var
  X: Integer;
begin
  X := 10;
  DoubleTheValue (X);x±äÁ¿µÄÖµ±ä³ÉÁË20£¬ÒòΪ¹ý³Ìͨ¹ýÒýÓ÷ÃÎÊÁËXµÄԭʼ´æ´¢µ¥Ôª£¬Óɴ˸ıäÁËXµÄ³õʼֵ ÔÚC++ÖУ¬ ÒýÓÃÓÃ&±íʾ
ÖµµÃ×¢ÒâµÄÊÇ£º
Delphi 3Ôö¼ÓÁËÒ»ÖÖеIJÎÊý£ºout¡£out²ÎÊýûÓгõʼֵ£¬Ö»ÊÇÓÃÀ´·µ»ØÒ»¸öÖµ¡£out²ÎÊýÓ¦Ö»ÓÃÓÚCOM¹ý³ÌºÍº¯Êý£¬Ò»°ãÇé¿öÏÂ×îºÃʹÓøüÓÐЧµÄvar²ÎÊý¡£³ýÁËûÓгõʼֵÕâÒ»µãÖ®Í⣬out²ÎÊýÓëvar²ÎÊýÏàͬ¡£
³£Á¿²ÎÊý
ºÍC++Ò»Ñù£¬ÓÃCONST¹Ø¼ü×Ö±íʾ
function DoubleTheValue (const Value: Integer): Integer
±àÒëÆ÷»áÑ¡ÓÃÒ»ÖÖÓëÒýÓòÎÊýÏàËƵķ½·¨±àÒë³£²Î£¨C++ÊõÓïÖеij£Á¿ÒýÓã©£¬µ«ÊÇ´Ó±íÃæÉÏ¿´³£²ÎÓÖÓëÖµ²ÎÏàËÆ£¬ÒòΪ³£²Î³õʼֵ²»ÊÜÀý³ÌµÄÓ°Ïì¡£
¿ª·ÅÊý×é²ÎÊý
ÓëCÓïÑÔ²»Í¬£¬Pascal º¯Êý¼°¹ý³ÌµÄ²ÎÊý¸öÊýÊÇÔ¤¶¨µÄ¡£Èç¹û²ÎÊý¸öÊýÔ¤ÏÈûÓÐÈ·¶¨£¬ÔòÐèҪͨ¹ý¿ª·ÅÊý×éÀ´ÊµÏÖ²ÎÊý´«µÝ¡£
Ò»¸ö¿ª·ÅÊý×é²ÎÊý¾ÍÊÇÒ»¸ö¹Ì¶¨ÀàÐÍ¿ª·ÅÊý×éµÄÔªËØ¡£ Ò²¾ÍÊÇ˵£¬²ÎÊýÀàÐÍÒѶ¨Ò壬µ«ÊÇÊý×éÖеÄÔªËظöÊýÊÇδ֪Êý¡£
function Sum (const A: array of Integer): Integer;ÀàÐͱ仯µÄ¿ª·ÅÊý×é²ÎÊý
³ýÁËÀàÐ͹̶¨µÄ¿ª·ÅÊý×éÍ⣬Delphi »¹ÔÊÐí¶¨ÒåÀàÐͱ仯µÄÉõÖÁÎÞÀàÐ͵Ŀª·ÅÊý×é¡£ÕâÖÖÌØÊâÀàÐ͵ÄÊý×éÔªËØ¿ÉËæÒâ±ä»¯£¬Äܷܺ½±ãµØÓÃ×÷´«µÝ²ÎÊý¡£
¼¼ÊõÉÏ£¬array of const ÀàÐ͵ÄÊý×é¾ÍÄÜʵÏְѲ»Í¬ÀàÐÍ¡¢²»Í¬¸öÊýÔªËØ×é³ÉµÄÊý×éÒ»ÏÂ×Ó´«µÝ¸øÀý³Ì
function Format (const Format: string; const Args: array of const): string;N := 20;
S := 'Total:';
Label1.Caption := Format ('Total: %d', [N]);
Label2.Caption := Format ('Int: %d, Float: %f', [N, 12.4]);
Label3.Caption := Format ('%s %d', [S, N * 2]);
µ«ÎÒÃÇÍùÍù»áÓöµ½ÕâÑùµÄÎÊÌ⣺
ÔÚFUN£¨£©Öд«Èë var a: array of integer ²ÎÊýÖ®ºó
²»ÄÜÔÚº¯ÊýÀïSetLength£¨a£¬num£©;
ËùÒÔÎÒÃǰѲÎÊýÉèΪ¶¯Ì¬Êý×éÀàÐÍ
type
tarrayofinteger = array of integer;
procedure grow( var data: tarrayofinteger );
begin
setlength( data, length(data) ,   г¤¶È );
// ¶¯Ì¬Êý×é×÷Ϊ²ÎÊý¿ÉÒԸıäÊý×é´óС¡£


Ïà¹ØÎĵµ£º

Delphi ÀàÓë¶ÔÏóÄÚ´æ½á¹¹Ç³Îö(ÉÏ)


²Î¿¼×ÊÁÏ
ÀîÕ½.¡¶Îò͸delphi¡·£¬µÚ1Õ“DELPHIµÄÔ­×ÓÊÀ½ç”
 “̽Ë÷DelphiÀàÓë¶ÔÏóµÄÄÚ´æ½á¹¹”
»ù±¾ÖªÊ¶
¶¯Ì¬ÄÚ´æÓ뾲̬ÄÚ´æ
µ±³ÌÐòÔËÐÐʱ£¬ÏµÍ³Ê×ÏȽ«ËùÓÐÊý¾Ý×°ÔØÈëÄڴ棬Íê³É³õʼ»¯£¬È»ºó´ÓÈë¿ÚµØÖ·¿ªÊ¼Ö´ÐдúÂë¡£
³ÌÐò×°Ôغ󼴴æÔÚÓÚÄÚ´æ¿Õ¼äÖеÄÊý¾ÝÎÒÃdzÆ֮Ϊ¾²Ì¬Äڴ棬ÔËÐйý³ÌÖÐ ......

Delphi 6.0¸ß¼¶±à³Ì

±¾ÊéÒÔʵÀýΪÖ÷Ïߣ¬¸¨ÒÔ±ØÒªµÄ¼¼Êõ±³¾°ÒªµãÀ´½²½âDelphi 6£®0±à³ÌµÄ¾«Ë裻±¾ÊéʵÀýÆ«ÖØÓÚ¶àýÌåºÍÍøÂç³ÌÐò¿ª·¢£¬ÆäÖÐÉæ¼°µ½OpenGL¡¢Indy×é¼þ¡¢XML¡¢Web BrokerºÍWebSnapµÈ¼¼Êõ¡£±¾Ê黹½²ÊöÁËDelphiÖеÄSQL±à³Ì£¬ÔÚÁ½¸ö¶ÌС¾«Á·µÄ³ÌÐòÖгä·ÖÔËÓÃÁËDelphiÊý¾Ý¿ª·¢¼¼Êõ£¬°üÀ¨BDE×é¼þµÄADO×é¼þµÄʹÓá£Í¨¹ý±¾Ê飬ÈöÁÕßÔÚ±à³Ì¹ ......

delphi TStringList Ó÷¨Ïê½â

delphi TStringList Ó÷¨Ïê½â
//TStringList ³£Ó÷½·¨ÓëÊôÐÔ
:
var
  List: TStringList;
  i: Integer;
begin
  List := TStringList.Create;
  List.Add('Strings1');           {Ìí¼Ó}
  List.Add('Strings2');
  List.Exch ......

delphiÊý×éÖ®²ËÄñƪ


Êý×éÊÇ¿ÉÒÔͨ¹ýË÷ÒýÀ´ÒýÓõÄͬÀàÐÍÊý¾ÝµÄÁÐ±í¡£°´ÕÕ´æ´¢¿Õ¼äµÄ»ñÈ¡·½Ê½£¬Delphi
Ö§³ÖµÄÊý×éÀàÐÍÓÐÁ½ÖÖ£¬¼´¾²Ì¬Êý×éºÍ¶¯Ì¬Êý×é¡£Ëùν¾²Ì¬Êý×é¾ÍÊÇÔÚÉùÃ÷ʱ¾ÍÒѾ­È·¶¨´óСµÄÊý×éÀàÐÍ£¬¶ø¶¯Ì¬Êý×éÊÇÖ¸Æä´óСÔÚÉùÃ÷ʱ²»ÄÜÈ·¶¨µÄÊý×飬¶¯Ì¬Êý×éµÄ´óСÔÚʹÓÃʱȷ¶¨¡£
ÉùÃ÷¾²Ì¬Êý×éµÄ·½Ê½·Ç³£¼òµ¥£¬Ö»ÒªÖ¸Ã÷Êý×鳤¶ÈºÍÊý¾ÝÀàÐÍ ......

»ùÓÚDelphiµÄSocket I/OÄ£ÐÍÈ«½Ó´¥(×ܽá) [ת]

ת×Ô´ó¸»ÎÌhttp://www.delphibbs.com/keylife/iblog_show.asp?xid=30049
ÀϳÂÓÐÒ»¸öÔÚÍâµØ¹¤×÷µÄÅ®¶ù£¬²»Äܾ­³£»ØÀ´£¬ÀϳºÍËýͨ¹ýÐżþÁªÏµ¡£ËûÃǵÄÐŻᱻÓʵÝԱͶµÝµ½ËûÃǵÄÐÅÏäÀï¡£
¡¡¡¡ÕâºÍSocketÄ£Ðͷdz£ÀàËÆ¡£ÏÂÃæÎÒ¾ÍÒÔÀϳ½ÓÊÕÐżþΪÀý½²½âSocket I/OÄ£ÐÍ¡£
¡¡¡¡Ò»£ºselectÄ£ÐÍ
¡¡¡¡Àϳ·dz£Ïë¿´µ½Å®¶ùµÄÐÅ¡£ÒÔÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ