Delphi에서 [int map string] 구현

1380 단어 String

 Delphi   [int map string] 
Type
    TIntToStrArray = Array[0..65535] Of PChar;
//        Integer,[Error] :Data type too large: exceeds 2 GB
//      ,      
//          ,       
 

Var
    aIntToStrArray: TIntToStrArray;
Begin
  aIntToStrArray[1]:='a[1]';
End;
{===========================================}
            ,    ,      。

Type
   TSynReplaceCharsArray = Array[char] Of PChar;   

Var
fReplaceReserved: TSynReplaceCharsArray;
Procedure  TForm1.FormCreate(Sender: TObject);
Begin
   fReplaceReserved[#153] := '™';
   fReplaceReserved[#224] := 'À';
   fReplaceReserved[#225] := 'Á';
End;
{===========================================}
Type
   TSynReplaceCharsArray = Array[Widechar] Of PChar;   

Var
fReplaceReserved: TSynReplaceCharsArray;

Procedure  TForm1.FormCreate(Sender: TObject);
Begin
   fReplaceReserved[Widechar(153)] := '™';
   fReplaceReserved[Widechar(224)] := 'À';
   fReplaceReserved[Widechar(225)] := 'Á';
End;
{===========================================}


 

좋은 웹페이지 즐겨찾기