parent
1aeb653f85
commit
4bb828705d
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
||||||
public const string Major = "3";
|
public const string Major = "3";
|
||||||
public const string Minor = "5";
|
public const string Minor = "5";
|
||||||
public const string Build = "1";
|
public const string Build = "1";
|
||||||
public const string Revision = "2277";
|
public const string Revision = "2281";
|
||||||
|
|
||||||
public const string MainVersion = Major + "." + Minor;
|
public const string MainVersion = Major + "." + Minor;
|
||||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%MINOR%=5
|
%MINOR%=5
|
||||||
%REVISION%=2277
|
%REVISION%=2281
|
||||||
%COREVERSION%=1
|
%COREVERSION%=1
|
||||||
%MAJOR%=3
|
%MAJOR%=3
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
3.5.1.2277
|
3.5.1.2281
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
!define VERSION '3.5.1.2277'
|
!define VERSION '3.5.1.2281'
|
||||||
|
|
|
||||||
|
|
@ -1926,6 +1926,8 @@ function ReadArrString(prompt: string; n: integer): array of string;
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
/// Возвращает двумерный массив размера m x n, заполненный указанными значениями по строкам
|
/// Возвращает двумерный массив размера m x n, заполненный указанными значениями по строкам
|
||||||
function Matr<T>(m,n: integer; params data: array of T): array [,] of T;
|
function Matr<T>(m,n: integer; params data: array of T): array [,] of T;
|
||||||
|
/// Возвращает двумерный массив, заполненный значениями из одномерных массивов
|
||||||
|
function Matr<T>(params aa: array of array of T): array [,] of T;
|
||||||
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
||||||
function MatrRandom(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
|
function MatrRandom(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
|
||||||
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
||||||
|
|
@ -4066,19 +4068,17 @@ begin
|
||||||
Result := Result.Concat(a);
|
Result := Result.Concat(a);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
///--
|
{function operator*<T>(a: sequence of T; n: integer): sequence of T; extensionmethod;
|
||||||
function operator*<T>(a: sequence of T; n: integer): sequence of T; extensionmethod;
|
|
||||||
begin
|
begin
|
||||||
Result := System.Linq.Enumerable.Empty&<T>();
|
Result := System.Linq.Enumerable.Empty&<T>();
|
||||||
loop n do
|
loop n do
|
||||||
Result := Result.Concat(a);
|
Result := Result.Concat(a);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
///--
|
|
||||||
function operator*<T>(n: integer; a: sequence of T): sequence of T; extensionmethod;
|
function operator*<T>(n: integer; a: sequence of T): sequence of T; extensionmethod;
|
||||||
begin
|
begin
|
||||||
Result := a * n;
|
Result := a * n;
|
||||||
end;
|
end;}
|
||||||
|
|
||||||
///--
|
///--
|
||||||
function operator in<T>(x: T; Self: sequence of T): boolean; extensionmethod;
|
function operator in<T>(x: T; Self: sequence of T): boolean; extensionmethod;
|
||||||
|
|
@ -10046,6 +10046,18 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function Matr<T>(params aa: array of array of T): array [,] of T;
|
||||||
|
begin
|
||||||
|
var cols := aa.Max(a -> a.Length);
|
||||||
|
var r := new T[aa.Length,cols];
|
||||||
|
|
||||||
|
for var i:=0 to aa.Length-1 do
|
||||||
|
for var j:=0 to aa[i].Length-1 do
|
||||||
|
r[i,j] := aa[i][j];
|
||||||
|
|
||||||
|
Result := r;
|
||||||
|
end;
|
||||||
|
|
||||||
// Реализация операций с матрицами - только после введения RowCount и ColCount
|
// Реализация операций с матрицами - только после введения RowCount и ColCount
|
||||||
function MatrRandom(m: integer; n: integer; a, b: integer): array [,] of integer;
|
function MatrRandom(m: integer; n: integer; a, b: integer): array [,] of integer;
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ type
|
||||||
/// Видимость графического объекта
|
/// Видимость графического объекта
|
||||||
property Visible: boolean
|
property Visible: boolean
|
||||||
read InvokeBoolean(()->ob.Visibility = Visibility.Visible)
|
read InvokeBoolean(()->ob.Visibility = Visibility.Visible)
|
||||||
write Invoke(procedure -> if value then ob.Visibility := Visibility.Visible else ob.Visibility := Visibility.Hidden);
|
write Invoke(procedure -> if value then begin gr.Visibility := Visibility.Visible; ob.Visibility := Visibility.Visible end else begin gr.Visibility := Visibility.Hidden; ob.Visibility := Visibility.Hidden end);
|
||||||
/// Выравнивание текста внутри графического объекта
|
/// Выравнивание текста внутри графического объекта
|
||||||
property TextAlignment: Alignment write Invoke(WTA,Value);
|
property TextAlignment: Alignment write Invoke(WTA,Value);
|
||||||
/// Размер шрифта текста внутри графического объекта
|
/// Размер шрифта текста внутри графического объекта
|
||||||
|
|
|
||||||
31
TestSuite/ExplicitInterface4.pas
Normal file
31
TestSuite/ExplicitInterface4.pas
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
var s: integer;
|
||||||
|
|
||||||
|
type
|
||||||
|
IA = interface
|
||||||
|
procedure P();
|
||||||
|
end;
|
||||||
|
|
||||||
|
A = class(IA)
|
||||||
|
public
|
||||||
|
{procedure P();
|
||||||
|
begin
|
||||||
|
end;}
|
||||||
|
procedure IA.P();
|
||||||
|
begin
|
||||||
|
s := 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
B = class(A, IA)
|
||||||
|
public
|
||||||
|
procedure IA.P();
|
||||||
|
begin
|
||||||
|
s := 2;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
var b1 := new B;
|
||||||
|
IA(b1).P;
|
||||||
|
Assert(s=2)
|
||||||
|
end.
|
||||||
31
TestSuite/ExplicitInterface5.pas
Normal file
31
TestSuite/ExplicitInterface5.pas
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
var s: integer;
|
||||||
|
|
||||||
|
type
|
||||||
|
IA = interface
|
||||||
|
procedure P();
|
||||||
|
end;
|
||||||
|
|
||||||
|
A = class(IA)
|
||||||
|
public
|
||||||
|
{procedure P();
|
||||||
|
begin
|
||||||
|
end;}
|
||||||
|
procedure IA.P();
|
||||||
|
begin
|
||||||
|
s := 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
B = class(A, IA)
|
||||||
|
public
|
||||||
|
{procedure IA.P();
|
||||||
|
begin
|
||||||
|
s := 2;
|
||||||
|
end;}
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
var b1 := new B;
|
||||||
|
IA(b1).P;
|
||||||
|
Assert(s=1)
|
||||||
|
end.
|
||||||
|
|
@ -989,7 +989,7 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
{
|
{
|
||||||
compar = si.sym_info as function_node;
|
compar = si.sym_info as function_node;
|
||||||
if (fn != compar && convertion_data_and_alghoritms.function_eq_params(fn, compar))
|
if (fn != compar && convertion_data_and_alghoritms.function_eq_params(fn, compar))
|
||||||
//if (fn is common_namespace_function_node && compar is common_namespace_function_node && (fn as common_namespace_function_node).comprehensive_namespace == (compar as common_namespace_function_node).comprehensive_namespace)
|
if (fn is common_namespace_function_node && compar is common_namespace_function_node && (fn as common_namespace_function_node).comprehensive_namespace == (compar as common_namespace_function_node).comprehensive_namespace)
|
||||||
|
|
||||||
AddError(new FunctionDuplicateDefinition(compar, fn));
|
AddError(new FunctionDuplicateDefinition(compar, fn));
|
||||||
}
|
}
|
||||||
|
|
@ -2723,7 +2723,8 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
{
|
{
|
||||||
if (fn_common.name != meth.name)
|
if (fn_common.name != meth.name)
|
||||||
{
|
{
|
||||||
syntax_tree_visitor.AddError(fn_common.loc, "AMBIGUITY_BETWEEN_NAMES_{0}_AND_{1}", fn_common.name, meth.name);
|
// SSM 21.12.19 - закомментировал - исправляет баг #2163. Не пойму, зачем эта проверка
|
||||||
|
//syntax_tree_visitor.AddError(fn_common.loc, "AMBIGUITY_BETWEEN_NAMES_{0}_AND_{1}", fn_common.name, meth.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1926,6 +1926,8 @@ function ReadArrString(prompt: string; n: integer): array of string;
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
/// Возвращает двумерный массив размера m x n, заполненный указанными значениями по строкам
|
/// Возвращает двумерный массив размера m x n, заполненный указанными значениями по строкам
|
||||||
function Matr<T>(m,n: integer; params data: array of T): array [,] of T;
|
function Matr<T>(m,n: integer; params data: array of T): array [,] of T;
|
||||||
|
/// Возвращает двумерный массив, заполненный значениями из одномерных массивов
|
||||||
|
function Matr<T>(params aa: array of array of T): array [,] of T;
|
||||||
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
||||||
function MatrRandom(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
|
function MatrRandom(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
|
||||||
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
|
||||||
|
|
@ -10044,6 +10046,18 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function Matr<T>(params aa: array of array of T): array [,] of T;
|
||||||
|
begin
|
||||||
|
var cols := aa.Max(a -> a.Length);
|
||||||
|
var r := new T[aa.Length,cols];
|
||||||
|
|
||||||
|
for var i:=0 to aa.Length-1 do
|
||||||
|
for var j:=0 to aa[i].Length-1 do
|
||||||
|
r[i,j] := aa[i][j];
|
||||||
|
|
||||||
|
Result := r;
|
||||||
|
end;
|
||||||
|
|
||||||
// Реализация операций с матрицами - только после введения RowCount и ColCount
|
// Реализация операций с матрицами - только после введения RowCount и ColCount
|
||||||
function MatrRandom(m: integer; n: integer; a, b: integer): array [,] of integer;
|
function MatrRandom(m: integer; n: integer; a, b: integer): array [,] of integer;
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ type
|
||||||
/// Видимость графического объекта
|
/// Видимость графического объекта
|
||||||
property Visible: boolean
|
property Visible: boolean
|
||||||
read InvokeBoolean(()->ob.Visibility = Visibility.Visible)
|
read InvokeBoolean(()->ob.Visibility = Visibility.Visible)
|
||||||
write Invoke(procedure -> if value then ob.Visibility := Visibility.Visible else ob.Visibility := Visibility.Hidden);
|
write Invoke(procedure -> if value then begin gr.Visibility := Visibility.Visible; ob.Visibility := Visibility.Visible end else begin gr.Visibility := Visibility.Hidden; ob.Visibility := Visibility.Hidden end);
|
||||||
/// Выравнивание текста внутри графического объекта
|
/// Выравнивание текста внутри графического объекта
|
||||||
property TextAlignment: Alignment write Invoke(WTA,Value);
|
property TextAlignment: Alignment write Invoke(WTA,Value);
|
||||||
/// Размер шрифта текста внутри графического объекта
|
/// Размер шрифта текста внутри графического объекта
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue