Some adds to GraphABC
This commit is contained in:
miks1965 2016-04-04 20:02:29 +03:00
parent c13a976a2b
commit 9adbd4d727
20 changed files with 359 additions and 14 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "1";
public const string Build = "0";
public const string Revision = "1211";
public const string Revision = "1213";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=1211
%REVISION%=1213
%MINOR%=1
%MAJOR%=3

Binary file not shown.

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: SSM
// DateTime: 03.04.2016 21:59:35
// DateTime: 03.04.2016 22:20:08
// UserName: ?????????
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>

View file

@ -2,9 +2,9 @@
// GPPG version 1.3.6
// Machine: SSM
// DateTime: 03.04.2016 21:59:36
// DateTime: 03.04.2016 22:20:09
// UserName: ?????????
// Input file <D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y>
// Input file <ABCPascal.y>
// options: no-lines gplex
@ -56,7 +56,7 @@ public abstract class ScanBase : AbstractScanner<PascalABCSavParser.Union,LexLoc
public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, LexLocation>
{
// Verbatim content from D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y
// Verbatim content from ABCPascal.y
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> GPPGParser, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> gppg
public syntax_tree_node root; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@ -68,7 +68,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
public ParserLambdaHelper lambdaHelper = new ParserLambdaHelper();
public GPPGParser(AbstractScanner<PascalABCSavParser.Union, LexLocation> scanner) : base(scanner) { }
// End verbatim content from D:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y
// End verbatim content from ABCPascal.y
#pragma warning disable 649
private static Dictionary<int, string> aliasses;

View file

@ -1 +1 @@
!define VERSION '3.1.0.1211'
!define VERSION '3.1.0.1213'

View file

@ -152,7 +152,6 @@
File ..\bin\Lib\ABCObjects.pas
File ..\bin\Lib\ABCSprites.pas
File ..\bin\Lib\Arrays.pas
File ..\bin\Lib\BFSystem.pas
File ..\bin\Lib\Colors.pas
File ..\bin\Lib\CRT.pas
File ..\bin\Lib\DMCollect.pas
@ -163,7 +162,6 @@
File ..\bin\Lib\Events.pas
File ..\bin\Lib\FilesOperations.pas
File ..\bin\Lib\FormsABC.pas
File ..\bin\Lib\GOLDParserEngine.pas
File ..\bin\Lib\GraphABC.pas
File ..\bin\Lib\GraphABCHelper.pas
File ..\bin\Lib\IniFile.pas
@ -197,7 +195,6 @@
${AddFile} "ABCObjects.pas"
${AddFile} "ABCSprites.pas"
${AddFile} "Arrays.pas"
${AddFile} "BFSystem.pas"
${AddFile} "Colors.pas"
${AddFile} "CRT.pas"
${AddFile} "DMCollect.pas"
@ -208,7 +205,6 @@
${AddFile} "Events.pas"
${AddFile} "FilesOperations.pas"
${AddFile} "FormsABC.pas"
${AddFile} "GOLDParserEngine.pas"
${AddFile} "GraphABC.pas"
${AddFile} "GraphABCHelper.pas"
${AddFile} "IniFile.pas"

View file

@ -1062,6 +1062,11 @@ namespace PascalABCCompiler.SyntaxTree
{
DefaultVisit(_slice_expr);
}
public virtual void visit(no_type _no_type)
{
DefaultVisit(_no_type);
}
}

View file

@ -1693,6 +1693,14 @@ namespace PascalABCCompiler.SyntaxTree
{
}
public virtual void pre_do_visit(no_type _no_type)
{
}
public virtual void post_do_visit(no_type _no_type)
{
}
public override void visit(syntax_tree_node _syntax_tree_node)
{
DefaultVisit(_syntax_tree_node);
@ -3508,6 +3516,13 @@ namespace PascalABCCompiler.SyntaxTree
visit(slice_expr.step);
post_do_visit(_slice_expr);
}
public override void visit(no_type _no_type)
{
DefaultVisit(_no_type);
pre_do_visit(_no_type);
post_do_visit(_no_type);
}
}

View file

@ -442,6 +442,8 @@ namespace PascalABCCompiler.SyntaxTree
return new dot_question_node();
case 210:
return new slice_expr();
case 211:
return new no_type();
}
return null;
}
@ -3750,6 +3752,17 @@ namespace PascalABCCompiler.SyntaxTree
_slice_expr.step = _read_node() as expression;
}
public void visit(no_type _no_type)
{
read_no_type(_no_type);
}
public void read_no_type(no_type _no_type)
{
read_type_definition(_no_type);
}
}

View file

@ -5908,6 +5908,18 @@ namespace PascalABCCompiler.SyntaxTree
}
}
public void visit(no_type _no_type)
{
bw.Write((Int16)211);
write_no_type(_no_type);
}
public void write_no_type(no_type _no_type)
{
write_type_definition(_no_type);
}
}

View file

@ -31182,6 +31182,100 @@ namespace PascalABCCompiler.SyntaxTree
}
///<summary>
///
///</summary>
[Serializable]
public partial class no_type : type_definition
{
///<summary>
///Конструктор без параметров.
///</summary>
public no_type()
{
}
///<summary>
///Конструктор с параметрами.
///</summary>
public no_type(type_definition_attr_list _attr_list)
{
this._attr_list=_attr_list;
}
///<summary>
///Конструктор с параметрами.
///</summary>
public no_type(type_definition_attr_list _attr_list,SourceContext sc)
{
this._attr_list=_attr_list;
source_context = sc;
}
///<summary>
///Свойство для получения количества всех подузлов без элементов поля типа List
///</summary>
public override Int32 subnodes_without_list_elements_count
{
get
{
return 1;
}
}
///<summary>
///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List
///</summary>
public override Int32 subnodes_count
{
get
{
return 1;
}
}
///<summary>
///Индексатор для получения всех подузлов
///</summary>
public override syntax_tree_node this[Int32 ind]
{
get
{
if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1)
throw new IndexOutOfRangeException();
switch(ind)
{
case 0:
return attr_list;
}
return null;
}
set
{
if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1)
throw new IndexOutOfRangeException();
switch(ind)
{
case 0:
attr_list = (type_definition_attr_list)value;
break;
}
}
}
///<summary>
///Метод для обхода дерева посетителем
///</summary>
///<param name="visitor">Объект-посетитель.</param>
///<returns>Return value is void</returns>
public override void visit(IVisitor visitor)
{
visitor.visit(this);
}
}
}

View file

@ -1270,6 +1270,12 @@ namespace PascalABCCompiler.SyntaxTree
///<param name="_slice_expr">Node to visit</param>
///<returns> Return value is void </returns>
void visit(slice_expr _slice_expr);
///<summary>
///Method to visit no_type.
///</summary>
///<param name="_no_type">Node to visit</param>
///<returns> Return value is void </returns>
void visit(no_type _no_type);
}

Binary file not shown.

View file

@ -241,8 +241,12 @@ procedure LineTo(x,y: integer; c: Color);
/// Рисует отрезок от точки (x1,y1) до точки (x2,y2)
procedure Line(x1,y1,x2,y2: integer);
/// Рисует отрезок от точки p1 до точки p2
procedure Line(p1,p2: Point);
/// Рисует отрезок от точки (x1,y1) до точки (x2,y2) цветом c
procedure Line(x1,y1,x2,y2: integer; c: Color);
/// Рисует отрезок от точки p1 до точки p2 цветом c
procedure Line(p1,p2: Point; c: Color);
/// Заполняет внутренность окружности с центром (x,y) и радиусом r
procedure FillCircle(x,y,r: integer);
@ -286,20 +290,36 @@ function Pnt(x,y: integer): Point;
/// Рисует замкнутую ломаную по точкам, координаты которых заданы в массиве points
procedure DrawPolygon(points: array of Point);
/// Рисует замкнутую ломаную по точкам, координаты которых заданы в массиве points
procedure DrawPolygon(params points: array of (integer,integer));
/// Заполняет многоугольник, координаты вершин которого заданы в массиве points
procedure FillPolygon(points: array of Point);
/// Заполняет многоугольник, координаты вершин которого заданы в массиве points
procedure FillPolygon(params points: array of (integer,integer));
/// Рисует заполненный многоугольник, координаты вершин которого заданы в массиве points
procedure Polygon(points: array of Point);
/// Рисует заполненный многоугольник, координаты вершин которого заданы в массиве points
procedure Polygon(params points: array of (integer,integer));
/// Рисует ломаную по точкам, координаты которых заданы в массиве points
procedure Polyline(points: array of Point);
/// Рисует ломаную по точкам, координаты которых заданы в массиве points
procedure Polyline(params points: array of (integer,integer));
/// Рисует кривую по точкам, координаты которых заданы в массиве points
procedure Curve(points: array of Point);
/// Рисует кривую по точкам, координаты которых заданы в массиве points
procedure Curve(params points: array of (integer,integer));
/// Рисует замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure DrawClosedCurve(points: array of Point);
/// Рисует замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure DrawClosedCurve(params points: array of (integer,integer));
/// Заполняет замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure FillClosedCurve(points: array of Point);
/// Заполняет замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure FillClosedCurve(params points: array of (integer,integer));
/// Рисует заполненную замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure ClosedCurve(points: array of Point);
/// Рисует заполненную замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure ClosedCurve(params points: array of (integer,integer));
/// Выводит строку s в прямоугольник к координатами левого верхнего угла (x,y)
procedure TextOut(x,y: integer; s: string);
@ -2262,6 +2282,16 @@ begin
Self.Y := y;
end;
function operator implicit(Self: Point): (integer,integer); extensionmethod;
begin
Result := (Self.X,Self.Y)
end;
function operator implicit(Self: (integer,integer)): Point; extensionmethod;
begin
Result := new Point(Self[0],Self[1])
end;
// Primitives
procedure SetPixel(x,y: integer; c: Color);
var b: boolean;
@ -2331,6 +2361,11 @@ begin
Monitor.Exit(f);
end;
procedure Line(p1,p2: Point; c: Color);
begin
Line(p1.X,p1.Y,p2.X,p2.Y,c)
end;
procedure Line(x1,y1,x2,y2: integer);
begin
Monitor.Enter(f);
@ -2341,6 +2376,11 @@ begin
Monitor.Exit(f);
end;
procedure Line(p1,p2: Point);
begin
Line(p1.X,p1.Y,p2.X,p2.Y)
end;
procedure FillCircle(x,y,r: integer);
begin
// SSM 14.5.10
@ -2546,6 +2586,12 @@ begin
Monitor.Exit(f);
end;
procedure DrawPolygon(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
DrawPolygon(pnts.ToArray);
end;
procedure FillPolygon(points: array of Point);
begin
Monitor.Enter(f);
@ -2556,6 +2602,12 @@ begin
Monitor.Exit(f);
end;
procedure FillPolygon(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
FillPolygon(pnts.ToArray);
end;
procedure Polygon(points: array of Point);
begin
if Brush.NETBrush <> nil then
@ -2564,6 +2616,12 @@ begin
DrawPolygon(points);
end;
procedure Polygon(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
Polygon(pnts.ToArray);
end;
procedure Polyline(points: array of Point);
begin
Monitor.Enter(f);
@ -2574,6 +2632,12 @@ begin
Monitor.Exit(f);
end;
procedure Polyline(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
Polyline(pnts.ToArray);
end;
procedure Curve(points: array of Point);
begin
Monitor.Enter(f);
@ -2584,6 +2648,12 @@ begin
Monitor.Exit(f);
end;
procedure Curve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
Curve(pnts.ToArray);
end;
procedure DrawClosedCurve(points: array of Point);
begin
Monitor.Enter(f);
@ -2594,6 +2664,12 @@ begin
Monitor.Exit(f);
end;
procedure DrawClosedCurve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
DrawClosedCurve(pnts.ToArray);
end;
procedure FillClosedCurve(points: array of Point);
begin
Monitor.Enter(f);
@ -2604,6 +2680,12 @@ begin
Monitor.Exit(f);
end;
procedure FillClosedCurve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
FillClosedCurve(pnts.ToArray);
end;
procedure ClosedCurve(points: array of Point);
begin
Monitor.Enter(f);
@ -2614,6 +2696,12 @@ begin
Monitor.Exit(f);
end;
procedure ClosedCurve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
ClosedCurve(pnts.ToArray);
end;
// Fills
procedure FloodFill(x,y: integer; c: Color);
var hdc,hBrush,hOldBrush: IntPtr;

View file

@ -11195,12 +11195,20 @@ namespace PascalABCCompiler.TreeConverter
var bl = _procedure_definition.proc_body as SyntaxTree.block;
if (bl != null && bl.program_code != null)
{
if (bl.program_code.subnodes.Count != 1)
AddError(get_location(fh.name), "ONLY_IN_SHORT_FUNC_DEFS_RETURN_TYPE_CANBE_OMITTED");
var ass = bl.program_code.subnodes[0] as SyntaxTree.assign;
if (ass != null)
if (ass != null && ass.to is ident && (ass.to as ident).name.ToLower()=="result")
{
var typ = SyntaxTreeBuilder.BuildSameType(ass.from);
if (ass.from is nil_const)
AddError(get_location(ass.from), "CAN_NOT_DEDUCE_TYPE_{0}","nil");
// undefined_type означает, что где-то в будущем это надо исправить. Потому что и Result будет этого типа
var typ = new semantic_type_node(new undefined_type("#Und",null));//SyntaxTreeBuilder.BuildSameType(ass.from);
fh.return_type = typ;
}
else AddError(get_location(fh.name), "ONLY_IN_SHORT_FUNC_DEFS_RETURN_TYPE_CANBE_OMITTED");
}
}
//\ SSM
@ -11364,6 +11372,20 @@ namespace PascalABCCompiler.TreeConverter
hard_node_test_and_visit(_procedure_definition.proc_body);
}
var ttt = context.top_function.return_value_type;
if (ttt is undefined_type)
{
var cd = context.top_function.function_code as statements_list;
statement_node aa = cd.statements[0];
var bfc = cd.statements[0] as basic_function_call;
if (bfc != null)
{
var ttt1 = bfc.type;
context.top_function.return_value_type = ttt1;
context.top_function.var_definition_nodes_list[0].type = ttt1;
}
}
add_clip_for_set(context.top_function);
}
@ -15678,6 +15700,10 @@ namespace PascalABCCompiler.TreeConverter
}
/// end
//SSM 4.04.16
if (to.type is undefined_type)
to.type = from.type;
if (stflambda.Count>0) // мы находимся внутри лямбды - возможно, вложенной
{
var fld = stflambda.Peek();

View file

@ -241,8 +241,12 @@ procedure LineTo(x,y: integer; c: Color);
/// Рисует отрезок от точки (x1,y1) до точки (x2,y2)
procedure Line(x1,y1,x2,y2: integer);
/// Рисует отрезок от точки p1 до точки p2
procedure Line(p1,p2: Point);
/// Рисует отрезок от точки (x1,y1) до точки (x2,y2) цветом c
procedure Line(x1,y1,x2,y2: integer; c: Color);
/// Рисует отрезок от точки p1 до точки p2 цветом c
procedure Line(p1,p2: Point; c: Color);
/// Заполняет внутренность окружности с центром (x,y) и радиусом r
procedure FillCircle(x,y,r: integer);
@ -286,20 +290,36 @@ function Pnt(x,y: integer): Point;
/// Рисует замкнутую ломаную по точкам, координаты которых заданы в массиве points
procedure DrawPolygon(points: array of Point);
/// Рисует замкнутую ломаную по точкам, координаты которых заданы в массиве points
procedure DrawPolygon(params points: array of (integer,integer));
/// Заполняет многоугольник, координаты вершин которого заданы в массиве points
procedure FillPolygon(points: array of Point);
/// Заполняет многоугольник, координаты вершин которого заданы в массиве points
procedure FillPolygon(params points: array of (integer,integer));
/// Рисует заполненный многоугольник, координаты вершин которого заданы в массиве points
procedure Polygon(points: array of Point);
/// Рисует заполненный многоугольник, координаты вершин которого заданы в массиве points
procedure Polygon(params points: array of (integer,integer));
/// Рисует ломаную по точкам, координаты которых заданы в массиве points
procedure Polyline(points: array of Point);
/// Рисует ломаную по точкам, координаты которых заданы в массиве points
procedure Polyline(params points: array of (integer,integer));
/// Рисует кривую по точкам, координаты которых заданы в массиве points
procedure Curve(points: array of Point);
/// Рисует кривую по точкам, координаты которых заданы в массиве points
procedure Curve(params points: array of (integer,integer));
/// Рисует замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure DrawClosedCurve(points: array of Point);
/// Рисует замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure DrawClosedCurve(params points: array of (integer,integer));
/// Заполняет замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure FillClosedCurve(points: array of Point);
/// Заполняет замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure FillClosedCurve(params points: array of (integer,integer));
/// Рисует заполненную замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure ClosedCurve(points: array of Point);
/// Рисует заполненную замкнутую кривую по точкам, координаты которых заданы в массиве points
procedure ClosedCurve(params points: array of (integer,integer));
/// Выводит строку s в прямоугольник к координатами левого верхнего угла (x,y)
procedure TextOut(x,y: integer; s: string);
@ -2262,6 +2282,16 @@ begin
Self.Y := y;
end;
function operator implicit(Self: Point): (integer,integer); extensionmethod;
begin
Result := (Self.X,Self.Y)
end;
function operator implicit(Self: (integer,integer)): Point; extensionmethod;
begin
Result := new Point(Self[0],Self[1])
end;
// Primitives
procedure SetPixel(x,y: integer; c: Color);
var b: boolean;
@ -2331,6 +2361,11 @@ begin
Monitor.Exit(f);
end;
procedure Line(p1,p2: Point; c: Color);
begin
Line(p1.X,p1.Y,p2.X,p2.Y,c)
end;
procedure Line(x1,y1,x2,y2: integer);
begin
Monitor.Enter(f);
@ -2341,6 +2376,11 @@ begin
Monitor.Exit(f);
end;
procedure Line(p1,p2: Point);
begin
Line(p1.X,p1.Y,p2.X,p2.Y)
end;
procedure FillCircle(x,y,r: integer);
begin
// SSM 14.5.10
@ -2546,6 +2586,12 @@ begin
Monitor.Exit(f);
end;
procedure DrawPolygon(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
DrawPolygon(pnts.ToArray);
end;
procedure FillPolygon(points: array of Point);
begin
Monitor.Enter(f);
@ -2556,6 +2602,12 @@ begin
Monitor.Exit(f);
end;
procedure FillPolygon(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
FillPolygon(pnts.ToArray);
end;
procedure Polygon(points: array of Point);
begin
if Brush.NETBrush <> nil then
@ -2564,6 +2616,12 @@ begin
DrawPolygon(points);
end;
procedure Polygon(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
Polygon(pnts.ToArray);
end;
procedure Polyline(points: array of Point);
begin
Monitor.Enter(f);
@ -2574,6 +2632,12 @@ begin
Monitor.Exit(f);
end;
procedure Polyline(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
Polyline(pnts.ToArray);
end;
procedure Curve(points: array of Point);
begin
Monitor.Enter(f);
@ -2584,6 +2648,12 @@ begin
Monitor.Exit(f);
end;
procedure Curve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
Curve(pnts.ToArray);
end;
procedure DrawClosedCurve(points: array of Point);
begin
Monitor.Enter(f);
@ -2594,6 +2664,12 @@ begin
Monitor.Exit(f);
end;
procedure DrawClosedCurve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
DrawClosedCurve(pnts.ToArray);
end;
procedure FillClosedCurve(points: array of Point);
begin
Monitor.Enter(f);
@ -2604,6 +2680,12 @@ begin
Monitor.Exit(f);
end;
procedure FillClosedCurve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
FillClosedCurve(pnts.ToArray);
end;
procedure ClosedCurve(points: array of Point);
begin
Monitor.Enter(f);
@ -2614,6 +2696,12 @@ begin
Monitor.Exit(f);
end;
procedure ClosedCurve(params points: array of (integer,integer));
begin
var pnts := points.Select(p -> Pnt(p[0],p[1]));
ClosedCurve(pnts.ToArray);
end;
// Fills
procedure FloodFill(x,y: integer; c: Color);
var hdc,hBrush,hOldBrush: IntPtr;

Binary file not shown.

View file

@ -6,3 +6,4 @@ ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Tuple allows only base assignment :=
TUPLE_TYPE_ERROR=Bad element in Tuple type
INTEGER_VALUE_EXPECTED=Integer value expected
BAD_SLICE_OBJECT=Slices are allowed for strings, dynamic arrays and lists only
ONLY_IN_SHORT_FUNC_DEFS_RETURN_TYPE_CANBE_OMITTED=Only in short function definitions you can omit the return type

View file

@ -6,3 +6,4 @@ ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Для кортежа допустимо толь
TUPLE_TYPE_ERROR=Ошибочная конструкция при построении типа кортежа
INTEGER_VALUE_EXPECTED=Ожидалось значение целого типа
BAD_SLICE_OBJECT=Срезы допустимы только для строк, динамических массивов и списков
ONLY_IN_SHORT_FUNC_DEFS_RETURN_TYPE_CANBE_OMITTED=Только в коротких определениях функций можно не указывать тип возвращаемого значения