From aa453fb155ebcb665c6202353c8bac0e899feeac Mon Sep 17 00:00:00 2001 From: miks1965 Date: Fri, 28 Sep 2018 15:52:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BE=D1=87=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- Localization/DefaultLang.resources | Bin 86013 -> 86015 bytes ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/MonteCarlo.pas | 2 +- TestSuite/CompilationSamples/PABCSystem.pas | 33 -------------------- TestSuite/extensionmethods13.pas | 2 +- TestSuite/generics22.pas | 12 +++---- 8 files changed, 11 insertions(+), 44 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 6d8cb62e3..fb9dd7bee 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 = "4"; public const string Build = "2"; - public const string Revision = "1799"; + public const string Revision = "1803"; 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 90bcad410..428d42c37 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=2 -%REVISION%=1799 +%REVISION%=1803 %MINOR%=4 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 736c5da07b368018b3e0c1cb601391413e5b1dcf..a23a704534a2329b7019d44a4ef18ab4e32cb468 100644 GIT binary patch delta 48 xcmex6pY{KI)(H<7r8hn-?B#s-@ZH0oJKnziy*a9{lM%t4JilLJGxLOB`vKbu9=HGi delta 46 wcmexApY`v2)(H<7B{x1S?B#g;^zG9RFJ3*^9NpK+2b;7Ux0FRec(Random(),Random())).Where(p->sqr(p.Item1)+sqr(p.Item2)<1).Count/n*4; + var pp := Range(1,n).Select(x->(Random(),Random())).Where(p->sqr(p.Item1)+sqr(p.Item2)<1).Count/n*4; Print(pp); end. \ No newline at end of file diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index d753c6949..22549005a 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -1836,24 +1836,6 @@ function ReadMatrInteger(m, n: integer): array [,] of integer; /// Возвращает матрицу m на n вещественных, введенных с клавиатуры function ReadMatrReal(m, n: integer): array [,] of real; - -// ----------------------------------------------------- -//>> Подпрограммы для создания кортежей # Subroutines for tuple generation -// ----------------------------------------------------- -///- function Rec(x1: T1, x2: T2,...): (T1,T2,...); -/// Возвращает кортеж из элементов разных типов -function Rec(x1: T1; x2: T2): System.Tuple; -///-- -function Rec(x1: T1; x2: T2; x3: T3): (T1, T2, T3); -///-- -function Rec(x1: T1; x2: T2; x3: T3; x4: T4): (T1, T2, T3, T4); -///-- -function Rec(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5): (T1, T2, T3, T4, T5); -///-- -function Rec(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6): (T1, T2, T3, T4, T5, T6); -///-- -function Rec(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6; x7: T7): (T1, T2, T3, T4, T5, T6, T7); - // ----------------------------------------------------- //>> Короткие функции Lst, LLst, HSet, SSet, Dict, KV # Short functions Lst, HSet, SSet, Dict, KV // ----------------------------------------------------- @@ -4278,21 +4260,6 @@ begin Result := ReadSeqStringWhile(cond); end; -// ----------------------------------------------------------------------------- -// Функции Rec для создания кортежей -// ----------------------------------------------------------------------------- -function Rec(x1: T1; x2: T2) := Tuple.Create(x1, x2); - -function Rec(x1: T1; x2: T2; x3: T3) := Tuple.Create(x1, x2, x3); - -function Rec(x1: T1; x2: T2; x3: T3; x4: T4) := Tuple.Create(x1, x2, x3, x4); - -function Rec(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5) := Tuple.Create(x1, x2, x3, x4, x5); - -function Rec(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6) := Tuple.Create(x1, x2, x3, x4, x5, x6); - -function Rec(x1: T1; x2: T2; x3: T3; x4: T4; x5: T5; x6: T6; x7: T7) := Tuple.Create(x1, x2, x3, x4, x5, x6, x7); - // ----------------------------------------------------------------------------- // Функции Lst, LLst, Dict, KV, HSet, SSet // ----------------------------------------------------------------------------- diff --git a/TestSuite/extensionmethods13.pas b/TestSuite/extensionmethods13.pas index 33f29ac36..843c97283 100644 --- a/TestSuite/extensionmethods13.pas +++ b/TestSuite/extensionmethods13.pas @@ -1,5 +1,5 @@ begin -var res := Seq('234 456','222 333').Select(s->s.ToWords).Select(ss->Rec(ss[0],ss[1].ToInteger)); +var res := Seq('234 456','222 333').Select(s->s.ToWords).Select(ss->(ss[0],ss[1].ToInteger)); var ind := 0; foreach tup: System.Tuple in res do begin diff --git a/TestSuite/generics22.pas b/TestSuite/generics22.pas index 82e8b76f9..508ea6ab3 100644 --- a/TestSuite/generics22.pas +++ b/TestSuite/generics22.pas @@ -1,10 +1,10 @@ begin - var r1 := Rec&(1, 1); - var r2 := Rec&(1, 1, 1); - var r3 := Rec&(1, 1, 1, 1); - var r4 := Rec&(1, 1, 1, 1, 1); - var r5 := Rec&(1, 1, 1, 1, 1, 1); - var r6 := Rec&(1, 1, 1, 1, 1, 1, 1); + var r1 := (1, 1); + var r2 := (1, 1, 1); + var r3 := (1, 1, 1, 1); + var r4 := (1, 1, 1, 1, 1); + var r5 := (1, 1, 1, 1, 1, 1); + var r6 := (1, 1, 1, 1, 1, 1, 1); assert(r1.Item1 = 1); assert(r2.Item1 = 1); assert(r3.Item1 = 1);