diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index bd08fed79..4ac663e08 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 = "2"; public const string Build = "0"; - public const string Revision = "1315"; + public const string Revision = "1316"; 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 3179443ac..11fcd0d79 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=1315 %MINOR%=2 +%REVISION%=1316 +%COREVERSION%=0 %MAJOR%=3 diff --git a/InstallerSamples/!NewExecutors/Исполнители.pas b/InstallerSamples/!NewExecutors/Исполнители.pas index 6d8fda26f..ce94c16e3 100644 --- a/InstallerSamples/!NewExecutors/Исполнители.pas +++ b/InstallerSamples/!NewExecutors/Исполнители.pas @@ -9,10 +9,9 @@ procedure procedure := Println; ///- -procedure integer. := Println(Self); -procedure real. := Println(Self); -procedure string. := Println(Self); - +procedure (Self: integer); extensionmethod := Println(Self); +procedure (Self: real); extensionmethod := Println(Self); +procedure (Self: string); extensionmethod := Println(Self); type = integer; @@ -395,12 +394,14 @@ end; function (Self: sequence of T): sequence of T; extensionmethod; begin - Self.Println + Self.Println; + Result := Self; end; function (Self: sequence of T): sequence of T; extensionmethod; begin - Self.Println(NewLine) + Self.Println(NewLine); + Result := Self; end; function (Self: sequence of T; cond: T -> boolean): sequence of T; extensionmethod; @@ -413,23 +414,53 @@ begin Result := Self.Take(n); end; -function (Self: sequence of T; cond: T -> boolean): integer; extensionmethod; +function (Self: sequence of T; cond: T -> boolean := nil): integer; extensionmethod; begin - Result := Self.Count(cond) + if cond = nil then + Result := Self.Count() + else Result := Self.Count(cond) end; -function (Self: sequence of integer): integer; extensionmethod := Self.Sum(); +function (Self: sequence of integer): integer; extensionmethod; +begin + Result := Self.Sum(); +end; + +function (Self: sequence of integer): real; extensionmethod; +begin + Result := Self.Average; +end; + +function (Self: sequence of integer): integer; extensionmethod; +begin + Result := Self.Min; +end; + +function (Self: sequence of integer): integer; extensionmethod; +begin + Result := Self.Max; +end; function (Self: sequence of T; conv: T -> Key): sequence of Key; extensionmethod; begin Result := Self.Select(conv); end; +function (x: integer): boolean; +begin + Result := x mod 2 = 0; +end; + function (Self: sequence of T; cond: T -> Key): sequence of T; extensionmethod; begin Result := Self.OrderBy(cond); end; +function (Self: sequence of T): sequence of T; extensionmethod; +begin + Result := Self.OrderBy(x->x); +end; + function (Self: sequence of T; cond: T -> Key): sequence of T; extensionmethod; begin Result := Self.OrderByDescending(cond); @@ -472,6 +503,7 @@ public end; type + ///!# Country = auto class nm,cap: string; inh: integer; @@ -514,6 +546,11 @@ begin Result := SeqGen(n,a,a->a*d) end; +function (n: integer := 10; a: integer := 0; b: integer := 10): sequence of integer; +begin + Result := ArrRandom(n,a,b) +end; + function : ; begin Result := new ; diff --git a/InstallerSamples/!NewExecutors/Пример3.pas b/InstallerSamples/!NewExecutors/Пример3.pas index f71a87687..0cdbfb640 100644 --- a/InstallerSamples/!NewExecutors/Пример3.pas +++ b/InstallerSamples/!NewExecutors/Пример3.pas @@ -4,7 +4,7 @@ begin {.(''); .;} - .('.txt'); + {.('.txt'); .(''); .(''); .(''); @@ -30,24 +30,24 @@ begin 2.(); end; 1.; - 2.; + 2.;} var := .('.txt'); .; .; - foreach var in do - .(); + foreach var in do + .(); .; - .('.txt').Numerate.; + {.('.txt').Numerate.; .; .('.txt').( -> .()); .; - .; + .;} end. \ No newline at end of file diff --git a/InstallerSamples/!NewExecutors/Прогрессии1.pas b/InstallerSamples/!NewExecutors/Прогрессии1.pas index ad9fc1a21..ebf455813 100644 --- a/InstallerSamples/!NewExecutors/Прогрессии1.pas +++ b/InstallerSamples/!NewExecutors/Прогрессии1.pas @@ -1,12 +1,14 @@ uses ; begin - var 1 := (1,2,20); - 1.; - (1.); - var 2 := 1.(x->x*x); - 2.; - var 3 := 2.(x -> x mod 10 = 5); - 3.; + var := (1,2,20); + .; + ..; + var := (1,2,10); + .; + ..; + var := (10,1,100); + .; + (.,.); end. \ No newline at end of file diff --git a/InstallerSamples/!NewExecutors/Страны2.pas b/InstallerSamples/!NewExecutors/Страны2.pas index 9febeacb1..971484e31 100644 --- a/InstallerSamples/!NewExecutors/Страны2.pas +++ b/InstallerSamples/!NewExecutors/Страны2.pas @@ -8,6 +8,10 @@ begin (); += 1; end; - . + .; + + var := .( -> ..('')); + .; + ..; end. \ No newline at end of file diff --git a/InstallerSamples/!NewExecutors/СтраныGUI.pas b/InstallerSamples/!NewExecutors/СтраныGUI.pas index bd9f21dc8..43551ff71 100644 --- a/InstallerSamples/!NewExecutors/СтраныGUI.pas +++ b/InstallerSamples/!NewExecutors/СтраныGUI.pas @@ -3,20 +3,18 @@ uses begin // - var := .( -> ..('')); + var := .( -> ..('')); - var := .( -> . = ''); + var := .( -> . = ''); - var := .( -> . < 100000); + var := .( -> . < 100000); // var := ; + .(); - CreateButton('', () -> .()); + CreateButton('', () -> .()); CreateButton(' ', () -> .()); CreateButton(' ', () -> .()); CreateButton(' ', () -> .()); - - // - .(); end. \ No newline at end of file diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index ccf6fada2..0431a9c5d 100644 Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 59237259a..665ec865a 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.2.0.1315' +!define VERSION '3.2.0.1316' diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index 25530bc96..f9f8c9af6 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ