當前位置:編程學習大全網 - 網站源碼 - delphi裏的inttostr代碼在哪裏查

delphi裏的inttostr代碼在哪裏查

Delphi中的IntToStr()函數在SysUtils單元中。

用法如:ShowMessage(IntToStr(15*20));

IntToStr function

Converts an integer to a string.

Unit

SysUtils

Category

numeric formatting routines

Delphi syntax:

function IntToStr(Value: Integer): string; overload;

function IntToStr(Value: Int64): string; overload;

C++ syntax:

extern PACKAGE AnsiString __fastcall IntToStr(int Value);

extern PACKAGE AnsiString __fastcall IntToStr(__int64 Value);

Description

IntToStr converts an integer into a string containing the decimal representation of that number.

它的源碼是匯編的:

function IntToStr(Value: Integer): string;

// FmtStr(Result, '%d', [Value]);

asm

PUSH ESI

MOV ESI, ESP

SUB ESP, 16

XOR ECX, ECX // base: 0 for signed decimal

PUSH EDX // result ptr

XOR EDX, EDX // zero filled field width: 0 for no leading zeros

CALL CvtInt

MOV EDX, ESI

POP EAX // result ptr

CALL System.@LStrFromPCharLen

ADD ESP, 16

POP ESI

end;

  • 上一篇:在使用cydia時出現紅字部分。每次使用cydia更新或卸載deb時出現這個畫面是必然的,紅字部分
  • 下一篇:夢幻吾皇有什麽技能嗎
  • copyright 2024編程學習大全網