From b0dc07a1ab3cb09456c8f7f29de6378227e85e63 Mon Sep 17 00:00:00 2001 From: miks1965 Date: Tue, 17 Jul 2018 22:54:18 +0300 Subject: [PATCH] =?UTF-8?q?SetRow=20=D0=B8=20SetCol=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TestSuite/PowerConst.pas | 5 +++++ bin/Lib/PABCSystem.pas | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 TestSuite/PowerConst.pas diff --git a/TestSuite/PowerConst.pas b/TestSuite/PowerConst.pas new file mode 100644 index 000000000..84ba37f73 --- /dev/null +++ b/TestSuite/PowerConst.pas @@ -0,0 +1,5 @@ +const a = 2 ** 3; + +begin + Assert(a = 8); +end. \ No newline at end of file diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 515b14983..39247a7a6 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -9376,6 +9376,9 @@ begin Self[k, j] := a[j] end; +/// Меняет строку k двумерного массива на другую строку +procedure SetRow(Self: array [,] of T; k: integer; a: sequence of T); extensionmethod := Self.SetRow(k,a.ToArray); + /// Меняет столбец k двумерного массива на другой столбец procedure SetCol(Self: array [,] of T; k: integer; a: array of T); extensionmethod; begin @@ -9385,6 +9388,9 @@ begin Self[i, k] := a[i] end; +/// Меняет столбец k двумерного массива на другой столбец +procedure SetCol(Self: array [,] of T; k: integer; a: sequence of T); extensionmethod := Self.SetCol(k,a.ToArray); + /// Возвращает по заданному двумерному массиву последовательность (a[i,j],i,j) function ElementsWithIndexes(Self: array [,] of T): sequence of (T, integer, integer); extensionmethod; begin