diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 6fc89b8ce..35db7addf 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 = "3418"; + public const string Revision = "3419"; 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 963a31e86..1866a0792 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=3418 %MINOR%=9 +%REVISION%=3419 +%COREVERSION%=0 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 814fc980c..48f76c2a1 100644 Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 3e1dca446..a43dac2d6 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3418 +3.9.0.3419 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index db1338198..a038b53b0 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3418' +!define VERSION '3.9.0.3419' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index ef7d0be43..25ba0910a 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -8882,17 +8882,15 @@ end; procedure Shuffle(a: array of T); begin - var n := a.Length; - for var i := 0 to n - 1 do - Swap(a[i], a[Random(n)]); + for var i := a.Length - 1 downto 1 do + Swap(a[i], a[Random(i + 1)]); end; procedure Shuffle(l: List); begin - var n := l.Count; - for var i := 0 to n - 1 do + for var i := l.Count - 1 downto 1 do begin - var ind := Random(n); + var ind := Random(i + 1); var v := l[i]; l[i] := l[ind]; l[ind] := v; @@ -10756,10 +10754,9 @@ end; /// Перемешивает элементы списка случайным образом function Shuffle(Self: List): List; extensionmethod; begin - var n := Self.Count; - for var i := 0 to n - 1 do + for var i := Self.Count - 1 downto 1 do begin - var r := Random(n); + var r := Random(i + 1); var v := Self[i]; Self[i] := Self[r]; Self[r] := v; @@ -11814,9 +11811,8 @@ end; /// Перемешивает элементы массива случайным образом function Shuffle(Self: array of T): array of T; extensionmethod; begin - var n := Self.Length; - for var i := 0 to n - 1 do - Swap(Self[i], Self[Random(n)]); + for var i := Self.Length - 1 downto 1 do + Swap(Self[i], Self[Random(i + 1)]); Result := Self; end;