From 1f3f1b1f8e6770237c98ea8af8a3db7682af7d7d Mon Sep 17 00:00:00 2001 From: yamat0jp Date: Thu, 23 Sep 2021 19:43:12 +0900 Subject: [PATCH] =?utf8?q?=E6=9C=80=E5=BE=8C=E3=81=AE=E3=83=90=E3=83=BC?= =?utf8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=81=AB=E3=81=97=E3=81=9F=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Unit1.dfm | 3 +-- Unit1.pas | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Unit1.dfm b/Unit1.dfm index b62651e..64579c6 100644 --- a/Unit1.dfm +++ b/Unit1.dfm @@ -181,7 +181,6 @@ object Form1: TForm1 Height = 89 Lines.Strings = ( #22806#35251#12434#22793#26356 - ' --------------------' 'TJSONArray '#12395#23550#24540#12375#12414#12375#12383' ' ' --------------------' #21021#20844#38283) @@ -205,7 +204,7 @@ object Form1: TForm1 Left = 200 Top = 88 Bitmap = { - 494C010104000800480010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010104000800580010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 diff --git a/Unit1.pas b/Unit1.pas index 416f2e9..a719fd0 100644 --- a/Unit1.pas +++ b/Unit1.pas @@ -9,7 +9,7 @@ uses Vcl.ImgList, JSON, Vcl.Menus, Vcl.StdActns, System.Actions, Vcl.ActnList; type - TIndxChar = (chMul, chPlus, chMin, chEqu); + TIndxChar = (chMul, chPlus, chYen, chDollar, chSharp, chAnd, chPercent); TForm1 = class(TForm) Memo1: TMemo; @@ -89,7 +89,13 @@ var s: string; val: TJSONValue; i: integer; + c: Char; begin + c := returnChar(id); + if id = High(id) then + id := Low(id) + else + id := Succ(id); for i := 0 to arr.count - 1 do begin val := arr.Items[i]; @@ -99,7 +105,7 @@ begin arrloop(item, val as TJSONArray) else begin - s := '_' + arr.Items[i].ToString; + s := c + '_' + arr.Items[i].ToString; TreeView1.Items.AddChild(item, s); end; end; @@ -173,10 +179,16 @@ begin result := '*'; chPlus: result := '+'; - chMin: - result := '-'; - chEqu: - result := '='; + chYen: + result := '\'; + chDollar: + result := '$'; + chSharp: + result := '#'; + chAnd: + result := '&'; + chPercent: + result := '%'; end; end; -- 2.11.0