procedure TForm1.Button1Click(Sender: TObject);varstr: string;wh: TSize;w
Delphi 的字符及字符串[1] - string、AnsiString、WideString、String[n]、ShortString//最
Delphi的字符及字符串[2] - Char、AnsiChar、WideChar、PChar、PAnsiChar、PWideChar//單字符
//String 的指針地址及實際的內存地址varstr: string;pstr: PString;pc: PChar;begin{在沒有給 s
//字符串與字符數組vararr: array[0..5] of Char;str: string;begin{可以把字符串常量直接賦給字符數組;
Windows API 中的字符串對應這 Delphi 的 PChar(PAnsiChar); 在 API 中使用 Delphi 的字符串還 是比
Delphi的字符及字符串[6] - Char(AnsiChar)、WideChar與其編碼的相互轉換//Char 類型與其編碼值的轉換:var
DateUtils.YearsBetween();DateUtils.MonthsBetween();DateUtils.WeeksBetween
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes,
SysUtils.DayOfWeek();DateUtils.MonthOfTheYear();DateUtils.WeekOfTheYear()