This commit is contained in:
Mikhalkovich Stanislav 2019-03-11 23:09:55 +03:00
parent 943e426c97
commit a7e562b004
12 changed files with 22 additions and 35 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "4";
public const string Build = "2";
public const string Revision = "1994";
public const string Revision = "1996";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=4
%REVISION%=1994
%REVISION%=1996
%COREVERSION%=2
%MAJOR%=3

Binary file not shown.

View file

@ -1 +1 @@
!define VERSION '3.4.2.1994'
!define VERSION '3.4.2.1996'

View file

@ -3569,7 +3569,7 @@ namespace PascalABCCompiler.SyntaxTree
public void read_unnamed_type_object(unnamed_type_object _unnamed_type_object)
{
read_expression(_unnamed_type_object);
read_addressed_value(_unnamed_type_object);
_unnamed_type_object.ne_list = _read_node() as name_assign_expr_list;
_unnamed_type_object.is_class = br.ReadBoolean();
_unnamed_type_object.new_ex = _read_node() as new_expr;

View file

@ -5500,7 +5500,7 @@ namespace PascalABCCompiler.SyntaxTree
public void write_unnamed_type_object(unnamed_type_object _unnamed_type_object)
{
write_expression(_unnamed_type_object);
write_addressed_value(_unnamed_type_object);
if (_unnamed_type_object.ne_list == null)
{
bw.Write((byte)0);

View file

@ -42397,9 +42397,11 @@ namespace PascalABCCompiler.SyntaxTree
///Это - сахарная конструкция.
/// Объект безымянного класса. Например: new class(Name := 'Иванов'; Age := 25);
/// new_ex - это узел для генерации кода, основной узел предназначен для форматирования
/// Сделал потомком addressed_value из-за #1843
///</summary>
[Serializable]
public partial class unnamed_type_object : expression
public partial class unnamed_type_object : addressed_value
{
///<summary>

View file

@ -2558,7 +2558,7 @@
</TagIndices>
</Tags>
</SyntaxNode>
<SyntaxNode Name="unnamed_type_object" BaseName="expression">
<SyntaxNode Name="unnamed_type_object" BaseName="addressed_value">
<Fields>
<SyntaxField Name="ne_list" SyntaxType="name_assign_expr_list" />
<ExtendedField Name="is_class" Type="bool" CreateVariable="false" DeleteVariable="false" />
@ -4398,7 +4398,7 @@
<HelpData Key="unknown_ident.UnknownID" Value="" />
<HelpData Key="unknown_type" Value="" />
<HelpData Key="unknown_type.context" Value="" />
<HelpData Key="unnamed_type_object" Value="Это - сахарная конструкция.&#xD;&#xA;/// Объект безымянного класса. Например: new class(Name := 'Иванов'; Age := 25);&#xD;&#xA;/// new_ex - это узел для генерации кода, основной узел предназначен для форматирования" />
<HelpData Key="unnamed_type_object" Value="Это - сахарная конструкция.&#xD;&#xA;/// Объект безымянного класса. Например: new class(Name := 'Иванов'; Age := 25);&#xD;&#xA;/// new_ex - это узел для генерации кода, основной узел предназначен для форматирования&#xD;&#xA;&#xD;&#xA;/// Сделал потомком addressed_value из-за #1843" />
<HelpData Key="unnamed_type_object.is_class" Value="" />
<HelpData Key="unnamed_type_object.ne" Value="" />
<HelpData Key="unnamed_type_object.ne_list" Value="" />

View file

@ -1,18 +0,0 @@
// Пример решения задачи Dynamic2 из электронного задачника Programming Taskbook
uses PT4;
var p1,p2: PNode;
begin
Task('Dynamic2');
read(p1);
var n := 0;
while p1 <> nil do
begin
write(p1^.Data);
n += 1;
p2 := p1; { сохраняем адрес текущего элемента }
p1 := p1^.Next; { и переходим к следующему элементу }
end;
write(n, p2);
end.

View file

@ -409,6 +409,8 @@ type
procedure Append;
/// Открывает текстовый файл на дополнение в указанной кодировке
procedure Append(en: Encoding);
/// Возвращает последовательность строк открытого текстового файла
function Lines: sequence of string;
end;
/// Тип текстового файла
@ -5607,6 +5609,14 @@ procedure Text.Append := PABCSystem.Append(Self);
procedure Text.Append(en: Encoding) := PABCSystem.Append(Self,en);
function Text.Lines: sequence of string;
begin
Self.sr.BaseStream.Position := 0;
while not Eof do
yield ReadlnString;
end;
// -----------------------------------------------------
// AbstractBinaryFile methods
@ -8653,8 +8663,6 @@ function MinBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensionmet
begin
if selector = nil then
raise new ArgumentNullException('selector');
if not Self.Any() then
raise new InvalidOperationException('Empty sequence');
var comp := Comparer&<TKey>.Default;
Result := Self.Aggregate((min, x)-> comp.Compare(selector(x), selector(min)) < 0 ? x : min);
@ -8665,8 +8673,6 @@ function MaxBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensionmet
begin
if selector = nil then
raise new ArgumentNullException('selector');
if not Self.Any() then
raise new InvalidOperationException('Empty sequence');
var comp := Comparer&<TKey>.Default;
Result := Self.Aggregate((max, x)-> comp.Compare(selector(x), selector(max)) > 0 ? x : max);
@ -8677,8 +8683,6 @@ function LastMinBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensio
begin
if selector = nil then
raise new ArgumentNullException('selector');
if not Self.Any() then
raise new InvalidOperationException('Empty sequence');
var comp := Comparer&<TKey>.Default;
Result := Self.Aggregate((min, x)-> comp.Compare(selector(x), selector(min)) <= 0 ? x : min);
@ -8689,8 +8693,6 @@ function LastMaxBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensio
begin
if selector = nil then
raise new ArgumentNullException('selector');
if not Self.Any() then
raise new InvalidOperationException('Empty sequence');
var comp := Comparer&<TKey>.Default;
Result := Self.Aggregate((max, x)-> comp.Compare(selector(x), selector(max)) >= 0 ? x : max);

View file

@ -757,7 +757,8 @@ type
Group3D = class(ObjectWithChildren3D)
protected
function CreateObject: Object3D; override := new Group3D(X, Y, Z);
public
//public
protected
constructor(x, y, z: real) := CreateBase0(new ModelVisual3D, x, y, z);
constructor(x, y, z: real; lst: sequence of Object3D);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB