From 0d3ca8cdc43fa191f6dd223dd8a2cf4f9bd3b9da Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Mon, 1 Apr 2024 19:27:58 +0300 Subject: [PATCH] dict.GeT(key,default) --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/PABCSystem.pas | 4 ++-- bin/Lib/PABCSystem.pas | 4 ++-- bin/Lib/PABCSystem.xml | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index fdc0a1f00..96413413e 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "9"; public const string Build = "0"; - public const string Revision = "3450"; + public const string Revision = "3451"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index eebd37da2..423ad9647 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=3450 %MINOR%=9 +%REVISION%=3451 +%COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index b714564ce..5a5030e99 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3450 +3.9.0.3451 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 052c19b3f..134d4a051 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3450' +!define VERSION '3.9.0.3451' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index a167dc7b2..cae33b7c8 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -13714,11 +13714,11 @@ end; //>> Методы расширения словарей # Extension methods for IDictionary // ----------------------------------------------------------------------------- /// Возвращает в словаре значение, связанное с указанным ключом, а если такого ключа нет, то значение по умолчанию -function Get(Self: IDictionary; K: Key): Value; extensionmethod; +function Get(Self: IDictionary; K: Key; V: Value := default(Value)): Value; extensionmethod; begin var b := Self.TryGetValue(K, Result); if not b then - Result := default(Value); + Result := V; end; /// Возвращает словарь, сопоставляющий ключу группы количество элементов с данным ключом diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index a167dc7b2..cae33b7c8 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -13714,11 +13714,11 @@ end; //>> Методы расширения словарей # Extension methods for IDictionary // ----------------------------------------------------------------------------- /// Возвращает в словаре значение, связанное с указанным ключом, а если такого ключа нет, то значение по умолчанию -function Get(Self: IDictionary; K: Key): Value; extensionmethod; +function Get(Self: IDictionary; K: Key; V: Value := default(Value)): Value; extensionmethod; begin var b := Self.TryGetValue(K, Result); if not b then - Result := default(Value); + Result := V; end; /// Возвращает словарь, сопоставляющий ключу группы количество элементов с данным ключом diff --git a/bin/Lib/PABCSystem.xml b/bin/Lib/PABCSystem.xml index 0f1f680ec..374f08542 100644 --- a/bin/Lib/PABCSystem.xml +++ b/bin/Lib/PABCSystem.xml @@ -4130,7 +4130,7 @@ Возвращает комплексно сопряженное значение - + Возвращает в словаре значение, связанное с указанным ключом, а если такого ключа нет, то значение по умолчанию