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

delphiµÄÈ¡Õûº¯Êýround¡¢trunc¡¢ceilºÍfloor

1.Round£¨ËÄÉáÁùÈëÎåÁôË«£©
¹¦ÄÜ˵Ã÷£º¶ÔÒ»¸öʵÊý½øÐÐËÄÉáÎåÈë¡£(°´ÕÕÒøÐмÒËã·¨)
Àý£º
var
i, j: Integer;
begin
i := Round(1.5); // iµÈÓÚ2
j := Round(2.5); // jµÈÓÚ2
end;
ÔÚDelphiÖÐʹÓÃRoundº¯ÊýµÃµ½µÄ´ð°¸ÓÐʱÓëÎÒÃÇËùÔ¤ÆڵĻ᲻̫һÑù£º²ÉÓõÄÊÇËÄÉáÁùÈëÎåÁôË«¡£¼´µ±Éá»òÈëλ´óÓÚ»òСÓÚÎåʱ°´ËÄÉáÎåÈëÀ´´¦Àí
£¬¶øµ±Éá»òÈëλµÈÓÚÎåʱ£¬¾ÍÒª¿´Ç°ÃæһλÊÇʲô£¬¸ù¾ÝÆæ½øż²»½ø£¬Ëü×ÜÊÇ·µ»ØÒ»¸öżÊýÖµ¡£
Àý£º
i:= Round(11.5)//iµÈÓÚ12
i:= Round(10.5)//iµÈÓÚ10
ÕâÖÖRoundÆäʵÊÇ°´ÕÕÒøÐмÒËã·¨£¬Í³¼ÆѧÉÏÒ»°ã¶¼ÓÃÕâÖÖËã·¨£¬±È´«Í³µÄ"ËÄÉáÎåÈë"Òª¿Æѧ¡£
Èç¹ûҪʹÓô«Í³µÄ"ËÄÉáÎåÈë"·½·¨£¬¿ÉÒÔʹÓÃÏÂÃ溯Êý£º
function RoundClassic(R: Real)
2.trunc£¨È¡µÃXµÄÕûÊý²¿·Ö£©
È磺trunc(-123.55)=-123, floor(123.55)=123
3.ceil£¨È¡µÃ´óÓÚµÈÓÚXµÄ×îСµÄÕûÊý£©
È磺ceil(-123.55)=-123£¬ ceil(123.15)=124
4.floor£¨È¡µÃСÓÚµÈÓÚXµÄ×î´óµÄÕûÊý£©
È磺floor(-123.55)=-124£¬floor(123.55)=123


Ïà¹ØÎĵµ£º

Delphi ×é¼þ¿ª·¢½Ì³ÌÖ¸ÄÏ£¨3£©×é¼þ×¢²á

ÔÚÉÏһƪÖУ¬ÎÒÃǼòµ¥µÄʵÏÖÁËÒ»¸ö¶ÔDelphi×ÔÉíµÄTEdit±à¼­¿ò¿Ø¼þµÄÒ»¸öÀ©³ä£¡µ«ÊÇÎÒÃDz¢²»ÄÜÏñDelphi×Ô¼ºµÄTEditÒ»Ñù£¬Äܹ»
ÔÚÉè¼Æ״̬ϽøÐÐÉè¼Æ£¬¶øÊǷǵÃÒª×Ô¼ºÊÖ¶¯´´½¨¿Ø¼þ£¬È»ºó²ÅÄÜʹÓá£Õâ¸öËäȻ˵ҲÊÇ×é¼þ£¬µ«ÊÇȴʧȥÁË×é¼þµÄ¿ÉÉè¼ÆµÄ·½±ãÐÔ£¬½ö½ö¿É×÷Ϊһ¸öÀà¿âÀ´Ê¹Óá£
ÏÖÔÚÎÒ¾ÍÀ´½éÉÜһϣ¬ÈçºÎÈÃÕâ¸ö×é¼þ×¢ ......

DelphiʼþµÄ¹ã²¥


    Ã÷Ìì¾ÍÊÇÎåÒ»½ÚÁË£¬ÐÁ¿àÁ˺ü¸¸öÔ£¬½è´Ë»ú»áÓ¦¸Ã¾¡Çé·ÅËÉÒ»·¬¡£¿ÉÊÇÏëµ½BlogºÃ¾ÃûÓÐдÎÄÕ£¬ËƺõȱЩʲôËƵġ£Õ⼸¸öÔÂÀ´ÔÚÏîÄ¿ÖÐÓÖÔö³¤ÁËÐí¶à¾­Ñ飬ѧµ½Ðí¶àʵ¼ÊÓ¦ÓõÄ֪ʶ¡£²»Èç°ÑһЩ±È½ÏÓÐÓõļǼÏÂÀ´£¬¹©ÅóÓÑÃDzο¼¿ÉºÃ¡£
ÎÒÏëµ½DelphiµÄʼþ£¬ÄÇ¿ÉÕæÊǸö·½±ãµÄ¶«Î÷£¬³õѧÕßÔÚ´°ÌåÉÏÀ­¼¸¸ö¿ ......

Ò»¸ö·½±ãÓÐÓõÄDelphiÊý¾Ý¿â²Ù×÷Àà(ת)

unit MyADO;
interface
uses
SysUtils, Classes,ADODB,DB,Variants,StdCtrls,Dialogs;
type
TMyADO = class(TComponent)
    private
    Connection: TADOConnection;
    Query: TADOQuery;
    Table: TADOTable;
    FConnectio ......

delphi µ÷ÓÃC# webservice

תÔØ×Ô£ºhttp://www.cnblogs.com/jdmei520/archive/2009/06/17/1505053.html
Webservice¼¼ÊõµÄ³öÏÖ½«¸÷ÖÖ¿ª·¢¼¼ÊõºÍÓïÑÔÍêÈ«µÄÈÚºÏÁË£¬ÏÂÃæ¾ÍÕâÖÖÈÚºÏÔÚC#ºÍdelphiÖ®¼äµÄ½»»¥×öÒ»´ÎÈ«ÃæµÄÌåÏÖ
1.ʹÓÃC#´´½¨Ò»¸öWebservice·þÎñ¡£
ʹÓÃvs2005µÄÄ£°å´´½¨C#µÄwebservice·Ç³£ÈÝÒס£Ô­ÎļþÈçÏÂ:
[WebService(Namespace  ......

Delphi±í´ïʽ

function ExpCalc(exp: string): string;
var
vScript: Variant;
begin
vScript := CreateOleObject('ScriptControl');
vScript.Language := 'VBScript';
Result := vScript.Eval(exp);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
s:string;
begin
s:=ExpCalc('100 *4.17/0.5*(55. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ