diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs
index 0968bf6da..3e0837b02 100644
--- a/Configuration/GlobalAssemblyInfo.cs
+++ b/Configuration/GlobalAssemblyInfo.cs
@@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PascalABC.NET Compiler")]
-[assembly: AssemblyCopyright("Copyright © 2005-2022 by Ivan Bondarev, Stanislav Mihalkovich")]
+[assembly: AssemblyCopyright("Copyright © 2005-2021 by Ivan Bondarev, Stanislav Mihalkovich")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion(RevisionClass.FullVersion)]
@@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "8";
public const string Build = "3";
- public const string Revision = "3181";
+ public const string Revision = "3191";
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 5b6605f0d..49a1f11eb 100644
--- a/Configuration/Version.defs
+++ b/Configuration/Version.defs
@@ -1,4 +1,4 @@
%MINOR%=8
-%REVISION%=3181
+%REVISION%=3191
%COREVERSION%=3
%MAJOR%=3
diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources
index 38c63eb29..92cb6e85d 100644
Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ
diff --git a/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Extension methods for array of T.html b/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Extension methods for array of T.html
index 19096bc4b..40cbc924d 100644
--- a/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Extension methods for array of T.html
+++ b/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Extension methods for array of T.html
@@ -41,11 +41,15 @@
function Cartesian<T>(Self: array of T; n: integer): sequence of array of T;
n- , |
function Cartesian<T>(Self: sequence of T; n: integer): sequence of array of T;
- n- , |
+
n- ,
+function Cartesian(Self: string; n: integer): sequence of string;
+ n- , |
function Combinations<T>(Self: array of T; m: integer): sequence of array of T;
m |
function Combinations<T>(Self: sequence of T; m: integer): sequence of array of T;
m |
+function Combinations(Self: string; m: integer): sequence of string;
+ m |
function ConvertAll<T, T1>(Self: array of T; converter: T->T1): array of T1;
|
function ConvertAll<T, T1>(Self: array of T; converter: (T,integer)->T1): array of T1;
@@ -122,6 +126,10 @@
n m |
function Permutations<T>(Self: sequence of T; m: integer): sequence of array of T;
n m |
+function Permutations(Self: string): sequence of string;
+ |
+function Permutations(Self: string; m: integer): sequence of string;
+ m |
function RandomElement<T>(Self: array of T): T;
|
function Shuffle<T>(Self: array of T): array of T;
diff --git a/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Subroutines for array of T generation.html b/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Subroutines for array of T generation.html
index c83e10f71..6d528e8b5 100644
--- a/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Subroutines for array of T generation.html
+++ b/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Subroutines for array of T generation.html
@@ -31,9 +31,13 @@
count , first second, next |
function ArrRandom(n: integer := 10; a: integer := 0; b: integer := 100): array of integer;
n, |
-function ArrRandomInteger(n: integer := 10; a: integer := 0; b: integer := 100): array of integer;
+ |
function ArrRandomInteger(n: integer; a: integer; b: integer): array of integer;
n, |
-function ArrRandomReal(n: integer := 10; a: real := 0; b: real := 10): array of real;
+ |
function ArrRandomInteger(n: integer := 10): array of integer;
+ n, |
+function ArrRandomReal(n: integer; a: real; b: real): array of real;
+ n, |
+function ArrRandomReal(n: integer := 10): array of real;
n, |
function ReadArrInt64(n: integer): array of int64;
n int64, |
diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
index 8eccb2791..69df50842 100644
--- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
+++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs
@@ -1,9 +1,9 @@
//
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
-// Machine: DESKTOP-2BJCJ7I
-// DateTime: 11.09.2022 12:57:49
-// UserName: ibond
+// Machine: DESKTOP-G8V08V4
+// DateTime: 04.10.2022 20:11:12
+// UserName: ?????????
// GPLEX input file
// GPLEX frame file
//
diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y
index 784366d25..929364402 100644
--- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y
+++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y
@@ -3268,6 +3268,8 @@ expr_l1
{ $$ = $1; }
| new_question_expr
{ $$ = $1; }
+// | var_stmt tkComma expr_l1
+// { $$ = $3; }
;
expr_l1_for_question_expr
diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
index 3b1c5d2bf..626472be6 100644
--- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
+++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
@@ -1,10 +1,10 @@
// (see accompanying GPPGcopyright.rtf)
// GPPG version 1.3.6
-// Machine: DESKTOP-2BJCJ7I
-// DateTime: 11.09.2022 12:57:50
-// UserName: ibond
-// Input file
+// Machine: DESKTOP-G8V08V4
+// DateTime: 04.10.2022 20:11:12
+// UserName: ?????????
+// Input file
// options: no-lines gplex
@@ -60,7 +60,7 @@ public abstract class ScanBase : AbstractScanner
{
- // Verbatim content from ABCPascal.y
+ // Verbatim content from D:\PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y
// ��� ���������� ����������� � ����� GPPGParser, �������������� ����� ������, ������������ �������� gppg
public syntax_tree_node root; // �������� ���� ��������������� ������
@@ -72,7 +72,7 @@ public partial class GPPGParser: ShiftReduceParser scanner) : base(scanner) { }
- // End verbatim content from ABCPascal.y
+ // End verbatim content from D:\PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y
#pragma warning disable 649
private static Dictionary aliasses;
diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc
index 6ddd8cfa5..0baf1356e 100644
--- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc
+++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc
@@ -360,5 +360,6 @@ script=
+
diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt
index 5023360b5..c131f0079 100644
--- a/Release/pabcversion.txt
+++ b/Release/pabcversion.txt
@@ -1 +1 @@
-3.8.3.3181
+3.8.3.3191
diff --git a/ReleaseGenerators/PT4/PT4pabc.dll b/ReleaseGenerators/PT4/PT4pabc.dll
index 08631869e..e956cfce6 100644
Binary files a/ReleaseGenerators/PT4/PT4pabc.dll and b/ReleaseGenerators/PT4/PT4pabc.dll differ
diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh
index eeaa0dd91..c9af720b8 100644
--- a/ReleaseGenerators/PascalABCNET_version.nsh
+++ b/ReleaseGenerators/PascalABCNET_version.nsh
@@ -1 +1 @@
-!define VERSION '3.8.3.3181'
+!define VERSION '3.8.3.3191'
diff --git a/TestSuite/CompilationSamples/graph3d.pas b/TestSuite/CompilationSamples/graph3d.pas
index 0470a6fc0..1c13a9691 100644
--- a/TestSuite/CompilationSamples/graph3d.pas
+++ b/TestSuite/CompilationSamples/graph3d.pas
@@ -562,6 +562,50 @@ type
end;
/// Цвет 3D-объекта
property Color: GColor read GetColor write SetColor; virtual;
+
+ /// Локальная ось X в глобальных координатах
+ property LocalAxisX: Vector3D
+ read Invoke&(()->model.GetTransform.Transform(new Vector3D(1,0,0)));
+ /// Локальная ось X в глобальных координатах
+ property LocalAxisY: Vector3D
+ read Invoke&(()->model.GetTransform.Transform(new Vector3D(0,1,0)));
+ /// Локальная ось X в глобальных координатах
+ property LocalAxisZ: Vector3D
+ read Invoke&(()->model.GetTransform.Transform(new Vector3D(0,0,1)));
+
+ /// Перемещает 3D-объект к точке (x,y,z) в локальных координатах
+ procedure MoveToLocal(x,y,z: real);
+ begin
+ var p := Invoke&(()->model.GetTransform.Transform(new Point3D(x,y,z)));
+ MoveTo(p);
+ end;
+ /// Перемещает 3D-объект к точке p в локальных координатах
+ procedure MoveToLocal(p: Point3D) := MoveToLocal(p.x,p.y,p.z);
+ /// Перемещает 3D-объект на вектор (dx,dy,dz) в локальных координатах
+ procedure MoveByLocal(dx,dy,dz: real);
+ begin
+ // x,y,z в локальных координатах всегда нули
+ MoveToLocal(dx, dy, dz);
+ end;
+ /// Перемещает 3D-объект на вектор v в локальных координатах
+ procedure MoveByLocal(v: Vector3D) := MoveByLocal(v.x,v.y,v.z);
+/// Возвращает анимацию перемещения объекта к точке (x, y, z) за seconds секунд в локальных координатах
+ function AnimMoveToLocal(x, y, z: real; seconds: real := 1): AnimationBase;
+ begin
+ var p := Invoke&(()->model.GetTransform.Transform(new Point3D(x,y,z)));
+ Result := AnimMoveTo(p);
+ end;
+/// Возвращает анимацию перемещения объекта к точке p за seconds секунд в локальных координатах
+ function AnimMoveToLocal(p: Point3D; seconds: real := 1): AnimationBase
+ := AnimMoveToLocal(p.x,p.y,p.z,seconds);
+/// Возвращает анимацию перемещения объекта на вектор (dx, dy, dz) за seconds секунд в локальных координатах
+ function AnimMoveByLocal(dx, dy, dz: real; seconds: real := 1): AnimationBase;
+ begin
+ Result := AnimMoveToLocal(dx, dy, dz, seconds);
+ end;
+/// Возвращает анимацию перемещения объекта на вектор v за seconds секунд в локальных координатах
+ function AnimMoveByLocal(v: Vector3D; seconds: real := 1): AnimationBase
+ := AnimMoveByLocal(v.x,v.y,v.z,seconds);
private
procedure MoveToProp(p: Point3D) := MoveTo(p);
@@ -3577,6 +3621,7 @@ begin
a := typeof(PyramidTWireframe);
a := typeof(SegmentsT);
a := typeof(TorusT);
+ a := a;
end;
var res: Object3D;
Invoke(procedure -> begin
diff --git a/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionParserController.cs b/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionParserController.cs
index 1d6870168..aff328440 100644
--- a/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionParserController.cs
+++ b/VisualPascalABCNET/IB/CodeCompletion/CodeCompletionParserController.cs
@@ -26,7 +26,10 @@ namespace VisualPascalABC
try
{
if (th != null)
+ {
th.Abort();
+ th.Join(); // Это обязательно. По большому счету вообще Abort надо заменить на современное завершение потоков
+ }
}
catch
{
diff --git a/VisualPascalABCNETLinux/IB/CodeCompletion/CodeCompletionParserController.cs b/VisualPascalABCNETLinux/IB/CodeCompletion/CodeCompletionParserController.cs
index 1d6870168..63bbfe0df 100644
--- a/VisualPascalABCNETLinux/IB/CodeCompletion/CodeCompletionParserController.cs
+++ b/VisualPascalABCNETLinux/IB/CodeCompletion/CodeCompletionParserController.cs
@@ -26,7 +26,11 @@ namespace VisualPascalABC
try
{
if (th != null)
- th.Abort();
+ {
+ IsDone = true;
+ th.Abort(); // надо бы заменить на что то современное
+ th.Join();
+ }
}
catch
{
@@ -133,11 +137,15 @@ namespace VisualPascalABC
}
}
+ private volatile bool IsDone = false;
+
private void InternalParsing()
{
- while (true)
+ while (!IsDone)
{
ParseInThread();
+ if (IsDone)
+ break;
System.Threading.Thread.Sleep(2000);
}
}
diff --git a/bin/Lib/Graph3D.pas b/bin/Lib/Graph3D.pas
index 0470a6fc0..1c13a9691 100644
--- a/bin/Lib/Graph3D.pas
+++ b/bin/Lib/Graph3D.pas
@@ -562,6 +562,50 @@ type
end;
/// Цвет 3D-объекта
property Color: GColor read GetColor write SetColor; virtual;
+
+ /// Локальная ось X в глобальных координатах
+ property LocalAxisX: Vector3D
+ read Invoke&(()->model.GetTransform.Transform(new Vector3D(1,0,0)));
+ /// Локальная ось X в глобальных координатах
+ property LocalAxisY: Vector3D
+ read Invoke&(()->model.GetTransform.Transform(new Vector3D(0,1,0)));
+ /// Локальная ось X в глобальных координатах
+ property LocalAxisZ: Vector3D
+ read Invoke&(()->model.GetTransform.Transform(new Vector3D(0,0,1)));
+
+ /// Перемещает 3D-объект к точке (x,y,z) в локальных координатах
+ procedure MoveToLocal(x,y,z: real);
+ begin
+ var p := Invoke&(()->model.GetTransform.Transform(new Point3D(x,y,z)));
+ MoveTo(p);
+ end;
+ /// Перемещает 3D-объект к точке p в локальных координатах
+ procedure MoveToLocal(p: Point3D) := MoveToLocal(p.x,p.y,p.z);
+ /// Перемещает 3D-объект на вектор (dx,dy,dz) в локальных координатах
+ procedure MoveByLocal(dx,dy,dz: real);
+ begin
+ // x,y,z в локальных координатах всегда нули
+ MoveToLocal(dx, dy, dz);
+ end;
+ /// Перемещает 3D-объект на вектор v в локальных координатах
+ procedure MoveByLocal(v: Vector3D) := MoveByLocal(v.x,v.y,v.z);
+/// Возвращает анимацию перемещения объекта к точке (x, y, z) за seconds секунд в локальных координатах
+ function AnimMoveToLocal(x, y, z: real; seconds: real := 1): AnimationBase;
+ begin
+ var p := Invoke&(()->model.GetTransform.Transform(new Point3D(x,y,z)));
+ Result := AnimMoveTo(p);
+ end;
+/// Возвращает анимацию перемещения объекта к точке p за seconds секунд в локальных координатах
+ function AnimMoveToLocal(p: Point3D; seconds: real := 1): AnimationBase
+ := AnimMoveToLocal(p.x,p.y,p.z,seconds);
+/// Возвращает анимацию перемещения объекта на вектор (dx, dy, dz) за seconds секунд в локальных координатах
+ function AnimMoveByLocal(dx, dy, dz: real; seconds: real := 1): AnimationBase;
+ begin
+ Result := AnimMoveToLocal(dx, dy, dz, seconds);
+ end;
+/// Возвращает анимацию перемещения объекта на вектор v за seconds секунд в локальных координатах
+ function AnimMoveByLocal(v: Vector3D; seconds: real := 1): AnimationBase
+ := AnimMoveByLocal(v.x,v.y,v.z,seconds);
private
procedure MoveToProp(p: Point3D) := MoveTo(p);
@@ -3577,6 +3621,7 @@ begin
a := typeof(PyramidTWireframe);
a := typeof(SegmentsT);
a := typeof(TorusT);
+ a := a;
end;
var res: Object3D;
Invoke(procedure -> begin
diff --git a/bin/Lib/LightPT.pas b/bin/Lib/LightPT.pas
index 56592f9b5..22bb24687 100644
--- a/bin/Lib/LightPT.pas
+++ b/bin/Lib/LightPT.pas
@@ -703,7 +703,7 @@ begin
InputList.Add(Result[i]);
end;
-/// Возвращает массив из n целых, введенных с клавиатуры
+{/// Возвращает массив из n целых, введенных с клавиатуры
function ReadArrInteger(n: integer): array of integer;
begin
Result := PABCSystem.ReadArrInteger(n); // и всё!!! Данные в InputList уже внесены!
@@ -731,12 +731,15 @@ end;
function ReadMatrReal(m, n: integer): array [,] of real;
begin
Result := PABCSystem.ReadMatrReal(m,n);
-end;
+end;}
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
function MatrRandomInteger(m: integer; n: integer; a: integer; b: integer): array [,] of integer;
begin
Result := PABCSystem.MatrRandomInteger(m,n,a,b);
+ if IsPT then exit;
+ foreach var x in Result.ElementsByRow do
+ InputList.Add(x);
end;
/// Возвращает двумерный массив размера m x n, заполненный случайными целыми значениями
@@ -763,7 +766,7 @@ begin
InputList.Add(x);
end;
-function ReadString: string;
+{function ReadString: string;
begin
Result := PABCSystem.ReadString;
if IsPT then exit;
@@ -775,7 +778,7 @@ function ReadlnString := ReadString;
function ReadString2 := (ReadString, ReadString);
-function ReadlnString2 := ReadString2;
+function ReadlnString2 := ReadString2;}
function ReadInteger(prompt: string): integer;
begin
@@ -859,6 +862,7 @@ type
function ReadLine: string; override;
begin
Result := inherited ReadLine;
+ InputList.Add(Result);
DoNewLineBeforeMessage := False;
end;
diff --git a/bin/Lib/Turtle.pas b/bin/Lib/Turtle.pas
index bff4fb89e..83d531e26 100644
--- a/bin/Lib/Turtle.pas
+++ b/bin/Lib/Turtle.pas
@@ -3,6 +3,8 @@ unit Turtle;
uses GraphWPF;
+type Colors = GraphWPF.Colors;
+
var
tp: Point;
a: real := 0;
diff --git a/bin/PT4/pt4pabc.dll b/bin/PT4/pt4pabc.dll
index 08631869e..e956cfce6 100644
Binary files a/bin/PT4/pt4pabc.dll and b/bin/PT4/pt4pabc.dll differ
diff --git a/bin/PascalABCNET.chm b/bin/PascalABCNET.chm
index 68a973a69..caeda9b65 100644
Binary files a/bin/PascalABCNET.chm and b/bin/PascalABCNET.chm differ