diff --git a/.gitignore b/.gitignore
index accde2d06..5348dfbff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,9 @@ bin/*.xml
bin/log.txt
bin/CompilerController.ini
+**/_vti_cnf
+**/_vti_pvt
+
TestSuite/CompilationSamples/*.pcu
TestSuite/CompilationSamples/*.pdb
TestSuite/CompilationSamples/*.exe
diff --git a/PABCNetHelp/01_decodemnemonics.pas b/PABCNetHelp/01_decodemnemonics.pas
new file mode 100644
index 000000000..76adcbb4d
--- /dev/null
+++ b/PABCNetHelp/01_decodemnemonics.pas
@@ -0,0 +1,50 @@
+uses System.Collections.Generic;
+
+var
+ mnem,f,f1: text;
+ d := new Dictionary PascalABC.NET
+, Delphi. ,
+ . PascalABC.NET
+ , - ,
+ ,
+. , PascalABC.NET ,
+ .NET: , , ,
+, , , (generics),
+, -. PABCSystem, ,
+ ,
+ . PascalABC.NET .NET-
+, .
+ PascalABC.NET ,
+Web, XML-, . PascalABC.NET
+ , -
+ .
+ - ,
+ - . ,
+ PascalABC.NET
+ (
+ ), -
+ . PascalABC.NET
+ .
+ ,
+ , Intellisense ( ,
+, ),
+, , . PascalABC.NET ,
+ RAD (Rapid
+Application Development - ). ,
+PascalABC.NET
+ .
+ " -
+". PascalABC.NET
+ :
+, - , -
+, .
+ - . PascalABC.NET
+ ,
+ , . Microsoft.NET PascalABC.NET
+ ,
+ : .
+PascalABC.NET
+ . , PascalABC.NET,
+ .
+ ,
+ . , PascalABC.NET
+ Programming
+Taskbook ( ..),
+ . ,
+ , . GraphABC
+ABCObjects .
+ , . "" : Collections
+ , Arrays
+ Forms
+ . Microsoft .NET -
+,
+ , .NET.
+.NET- ,
+ . Microsoft
+.NET,
+. 2015 .
+.NET 4.5. .NET- ,
+ -, (
+.NET IL-
+ . Intermediate Language - ). -
+ .
+, IL-,
+ , .
+ , JIT-
+(Just In Time - ),
+ .NET-
+ (
+),
+ . ,
+ . ,
+ . -, JIT-
+ , ,
+ . ,
+ . -,
+IL- - , ,
+ - . - newobj
+ , callvirt
+ throw . .NET
+ - exe
+ dll. IL-,
+ . ,
+ ,
+ . "" .NET-
+C#: .NET
+ . .NET-
+ , (CTS
+- Common Type System - ).
+ (, , )
+ .NET-.
+, , dll
+ C#, ,
+ PascalABC.NET,
+ . PascalABC.NET,
+ Visual Basic.NET.
+,
+ dll ,
+, . ,
+.NET, -
+ , -
+ , . , ,
+, . ,
+ IL-
+(, ILSpy). JIT-,
+ .NET (FCL
+- Foundation Class Library - ).
+ - , , , XML,
+, , . .NET-
+ .
+Microsoft.NET -
+Mono,
+ .NET- Linux. .NET. , .NET
+ .
+ PascalABC.NET. ,
+ PascalABC.NET. (
+C:\PABCWork.NET) Samples\!MainFeatures.
+ "/ " ,
+ PascalABC.NET.
+
+
+
+
+ .NET PascalABC.NET
+
+ Pascal Microsoft .NET.
+ PascalABC.NET
+
+ :
+,
+,
+ ,
+,
+,
+ ,
+ ,
+-,
+ ,
+ OpenMP. PascalABC.NET
+ ,
+ . 1970 .
+ . 80-
+ Turbo Pascal
+ Borland, 90-
+ Delphi,
+ Windows.
+Delphi - ,
+ Object Pascal. Delphi 7
+ Delphi Object Pascal
+ Delphi.
+ Object Pascal
+ open source Free
+Pascal. PascalABC.NET
+ :
+ Pascal , (Free Pascal),
+ ,
+
+. PascalABC.NET
+ Microsoft.NET, PascalABC.NET
+
+ .NET-: C#,
+Visual Basic.NET, C++, Oxygene . .NET
+ ,
+ , , ,
+ , .NET-.
+ , Microsoft.NET,
+ . PascalABC.NET Delphi (Object Pascal).
+ Delphi,
+ . ,
+ : , , PascalABC.NET
+ RemObjects Oxygene (Object Pascal 21 ).
+ .NET: ,
+ , Main,
+ . ,
+RemObjects Oxygene -
+ ( Visual Studio
+ IDE), . PascalABC.NET
+ , ( ,
+ , ),
+ , ,
+. PascalABC.NET
+ PascalABCCompiler Team (web-
+http://pascalabc.net). : , Begin3 ,
+ - .
+ .
+ Begin3.
+
+PascalABC.NET. 1.
+
+ , .
+ .
+
+ ( ),
+ -.
+ 2.
+ : ,
+ 3. : : , .
+ ,
+ (, , ,
+ , / ).
+ 4.
+ , : : , , ,
+ .
+
+ , . 5.
+: : ,
+ . 6. ,
+ .
+!: ! a1 ,
+ .
+ .
+ a1. . . 1.
+ ,
+ 2.
+ : , Enter
+
+ : ,
+ .
+ , . 3.
+ ,
+: Enter
+ : , ,
+ 4.
+ : . ,
+ ,
+ ExamBegin ,
+ .
+ , ,
+ .
+ ExamBegin2°. ; .
+ , .
+ : «MIN=» , «MAX=»
+ .
+ , -
+
+ « | »,
+ - .
+ - , ,
+ (, ,
+ ).
+ , . ,
+ , ,
+ Pascal. ,
+ «» ( ),
+ .
+
+( «» , , , ,
+ ),
+ : ,
+ ( ). ,
+ , , Pascal.
+
+.
+ , , ,
+ Exam
+ . .
+ Exam ,
+ .
+ , ,
+, ( ).
+ , , -,
+ - Pascal.
+ . ,
+ , :
+ ,
+ . ,
+ « » ( ),
+ «Input string was not in a correct format»
+(« »).
+ , Exam
+ , .
+ Exam ,
+ . , ,
+ (,
+ .
+ ,
+ .
+ . , ,
+ Pascal, .
+ , , , .
+ :
+ :
+ , , ,
+ ( ).
+ : -,
+( «», -), -,
+ , -,
+ ( ).
+
+. ,
+ ,
+ , . :
+ , ,
+ . , ,
+ , , ,
+ ,
+ -.
+ :
+ - .
+
+ , «:» ():
+ ( 0,
+ ). ( ) ,
+ , .
+ ,
+ , :
+
+ ,
+ , .
+
+.
+ PascalABC.NET,
+ , ExamBegin,
+ .
+ ExamBegin28°. M N,
+ — D, — M .
+ M × N,
+ ,
+ D (
+ ). ,
+ 7 .
+ -, , :
+ , , 8 ,
+ .
+ , «» ,
+ . , ,
+ , ,
+( , ).
+ ; Ins
+ ( , ).
+ , : , Ins (
+, . ) «»
+ . , «» ,
+ . , ,
+ .
+ ( ,
+ 10 ;
+
+ ExamBegin):
+ -.
+ , . -,
+ :
+ , ,
+ .
+
+
+.
+, Matrix,
+ ,
+ , .
+ , ExamBegin « » ,
+ ,
+ .
+ ExamTaskC 100 , ,
+
+ ( C4).
+ () - .
+ ;
+ , ,
+ / .
+ ExamTaskC
+( ).
+ ,
+ , Programming Taskbook,
+ , , ,
+ C.
+ ExamTaskC ,
+ ExamBegin.
+ .
+ ExamTaskC25°. .
+ N, N
+ -, , ExamBegin,
+ , :
+ ,
+ .
+ ;
+ (
+ Ctrl+Up Ctrl+Down).
+
+ ( 1020 ).
+ , .
+ , ,
+ ,
+
+ ,
+ ( ):
+ , , .
+ ,
+
+( ,
+ ):
+ :
+ 9 , , ,
+ .
+ , ,
+ .
+ ,
+ ( 50100
+). , .
+ ,
+ , .
+ ,
+ , PgUp, PgDn, Home, End, .
+ ,
+«» ,
+ ,
+ .
+ [+] ( Ctrl+PgDn),
+ [] ( Ctrl+PgUp).
+ [/]
+( Ctrl+Tab). ;
+ ,
+(
+ , , , ).
+ :
+ ,
+ ; .
+ , «» ,
+ .
+
+ ( )
+ ( Del
+ ).
+ .
+ ,
+ . ,
+ . ,
+ , ( ),
+, ,
+ ( , ) .
+ ExamTaskC53°. ().
+ M ,
+ N, N , -
+( ; ,
+ «» ,
+ ):
+ , , .
+ , , 30,
+ : M.
+ 30 - , : ,
+ . , ,
+ ,
+ .
+ .
+ ;
+ .
+ , ,
+ :
+ File48. , -
+
+ « | »,
+ (SA, SB
+ SC) (SD).
+ .
+ , ( )
+ (- ). , , ,
+ ,
+
+ .
+ , ( 1). ( ),
+ .
+ ,
+ , . . ,
+ . PascalABC.NET
+ Object Pascal
+
+
+ .NET
+ .NET
+
+
+ .NET
+
+
+ PascalABC.NET Delphi
+
+
+
+
++= -= .NET
+ .+= -= *=
+ += -= *= /=
+ .+= .new (ident := new type_name(params);).new . typeof .uses
+ .NET (
+ Delphi Prism).internal ( public,
+ private, protected).var a: integer :=
+ 1;var a :=
+ 1;for var
+ i := 1 to 10 do, foreach
+ var x in a do.lock, .
+
+
+foreach.interface .NET.TClass.object -
+ System.Object.exception -
+ System.Exception.string 1, 0.write
+ .set of
+ string).procedure of
+ object.file
+ read,
+ write.a[i][j] a[i,j] ).overload.Create.
+
+
+
+
diff --git a/PABCNetHelp/Common/features.html b/PABCNetHelp/Common/features.html
new file mode 100644
index 000000000..e7e4ebfad
--- /dev/null
+++ b/PABCNetHelp/Common/features.html
@@ -0,0 +1,283 @@
+
+
+
+
+
+packed threadvar inline asm exports library unsafe resourcestring dispinterface in out absolute dynamic
+ local platform requires abstract export message resident assembler safecall
+ automated far near stdcall cdecl published stored contains implements
+ varargs default deprecated package register dispid pascal writeonly
+ .Char(b)
+ := 'd'.pointer.PChar.@ .var a;
+ const b).message).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PABCNetHelp/Common/main.html b/PABCNetHelp/Common/main.html
new file mode 100644
index 000000000..628e08784
--- /dev/null
+++ b/PABCNetHelp/Common/main.html
@@ -0,0 +1,114 @@
+
+
+
+
+
+ PascalABC.NET
+
+
+
++=,
+-=, *=, /=,
+, ,
+
+ ,
+set
+ , foreach,
+ for foreach
+ ,
+ (generics), , , , - .
+ LockDrawing
+Redraw :
+
+
+
+
+
+uses GraphABC;
+begin
+ LockDrawing;
+ for var i:=1 to 500 do
+ begin
+ Window.Clear;
+ Brush.Color := clGreen;
+ Ellipse(i,100,i+100,200);
+ Redraw;
+ Sleep(1);
+ end;
+end.
+
+LockDrawing (
+),
+ , Redraw.
+Redraw ,
+
+.
+ :
+
+
+
+
+
+
diff --git a/PABCNetHelp/Examples/GraphABCEvents/GEv2.html b/PABCNetHelp/Examples/GraphABCEvents/GEv2.html
new file mode 100644
index 000000000..f78807c40
--- /dev/null
+++ b/PABCNetHelp/Examples/GraphABCEvents/GEv2.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+uses GraphABC;
+
+procedure MouseDown(x,y,mb: integer);
+begin
+ MoveTo(x,y);
+end;
+
+procedure MouseMove(x,y,mb: integer);
+begin
+ if mb=1 then LineTo(x,y);
+end;
+
+begin
+ //
+ OnMouseDown := MouseDown;
+ OnMouseMove := MouseMove
+end.
+
+ :
+
+
+
+
+
+
+
+
diff --git a/PABCNetHelp/Examples/Timers/Timer1.html b/PABCNetHelp/Examples/Timers/Timer1.html
new file mode 100644
index 000000000..9a354908e
--- /dev/null
+++ b/PABCNetHelp/Examples/Timers/Timer1.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+uses GraphABC;
+
+procedure KeyDown(Key: integer);
+begin
+ case Key of
+ VK_Left: Window.Left := Window.Left - 2;
+ VK_Right: Window.Left := Window.Left + 2;
+ VK_Up: Window.Top := Window.Top - 2;
+ VK_Down: Window.Top := Window.Top + 2;
+ end;
+end;
+
+begin
+ //
+ OnKeyDown := KeyDown;
+end.
+
+ 1 100
+ 3 :
+
+
+
+
+uses Timers;
+
+procedure TimerProc;
+begin
+ write(1);
+end;
+
+
+begin
+ var t := new Timer(100,TimerProc);
+ t.Start;
+ Sleep(3000);
+end.
+Sleep ,
+ ,
+ . Begin3 Programming Taskbook
+
+a b.
+ S=a*b P=2*(a+b).
+PT4
+ Task,
+ :
+
+uses PT4;
+
begin
Task('Begin3');
+
end.
.
+ PT4Load, - :
+
+
+
+Begin3 Enter.
+
+ Begin3.pas
+ PascalABC.NET
+( C:\PABCWork.NET).
+
+
+
+
+
+
+
+a b
+ , , read.
+ :
+
+
+uses PT4;
+
var a, b: integer;
+ begin
Task('Begin3');
+ read(a, b);
+ end.
+
+
+
+
+
+a b
+. ,
+
+( ), ,
+ ,
+.
+
+
+
+uses PT4;
+
var a, b: real;
+ begin
Task('Begin3');
+ read(a, b);
+ end.
+
+
+
+
+
+
+
+uses PT4;
+
var a, b, S, P: real;
+ begin
Task('Begin3');
+ read(a, b);
+ S := a * b;
+ P := 2 * (a + b);
+ write(P, S)
+ end.
+
+
+
+
+
+
+
+
+uses PT4;
+
var a, b, S, P: real;
begin
Task('Begin3');
read(a, b);
+ S := a * b;
+ P := 2 * (a + b);
+ write(S, P)
end.
+
+
+
+
+
+
+
+
+
+Begin3
+ ! ,
+ « (F2)»,
+ , F2.
+ PascalABC.NET ,
+
+ Shift+Ctrl+R.
+ a1
+
+
+
+
+
+
+
+
+Robot
+ Task,
+ :
+
+uses Robot;
+
begin
Task('a1');
+
end.
+ RBa1 ( RB
+, ). ( F9),
+ :
+
+
+
+
+
+uses Robot;
+
begin
Task('a1');
+ Right;Right;Right;Right;
end.
+
+
+
+
+
+uses Robot;
+
begin
Task('a1');
+ Right;Right;Right;Right;
+ Up;Up;Left;
end.
+
+
+Left ,
+ .
+
+
+
+uses Robot;
+
begin
Task('a1');
+ Right;Right;Right;Right;
+ Up;
+ Left;Paint;
+ Left;Paint;
+ Left;Paint;
+ Left;Paint;
+ Left;
+ end.
+
+
+
.,
+
+
+
+
+
+ 1.
+
+
+
+ -
+
+
+ Shift+Ctrl+L. :
+
+
+uses PT4Exam;
+
+begin
+ Task('ExamBegin2');
+
+end.
+
+
+
+
+PT4
+ PT4Exam,
+ Exam. Task,
+ . , -, .
+ , - Exam ,
+ Pascal.
+
+
+
+
+uses PT4Exam;
+var
+ a, b, c: real;
+begin
+ Task('ExamBegin2');
+ read(a, b, c);
+end.
+read, .
+ readln:
+
+readln(a, b, c);
+
readln :
+
+readln(a);
+readln(b);
+readln(c);
+
read readln.
+string, «» ,
+ real). Exam,
+ .
+min max real :
+
+if a < b then
+begin
+ min := a;
+ max := b;
+end
+else
+begin
+ min := b;
+ max := a;
+end;
+if c < min then
+ min := c
+else
+ if c > max then
+ max := c;
+
+
+
+
+writeln(min, max);
+
+
+
+
+
+writeln('MIN=', min);
+writeln('MAX=', max);
+
+writeln('MIN=', min:0:2);
+writeln('MAX=', max:0:2);
+
+
+
+
+
+read-write
+ ,
+ Exam. -, Exam
+ read-write readln-writeln ( -
+ «ln», ). -,
+ Exam ,
+ , . -,
+ Exam ,
+ ; , ,
+ (
+ ).
+
+ 2.
+
+
+
+
+
+
+
+
+
+
+
+
+
+uses PT4Exam;
+var
+ m, n, i, j: integer;
+ d: real;
+ a: array[1..10, 1..10] of real;
+begin
+ Task('ExamBegin28');
+ readln(m, n, d);
+ for i := 1 to m do
+ read(a[i, 1]);
+ for j := 2 to n do
+ for i := 1 to m do
+ a[i, j] := a[i, j - 1] + d;
+ for i := 1 to m do
+ begin
+ for j := 1 to n do
+ write(a[i, j]:7:2);
+ writeln;
+ end;
+end.
+d ,
+ m n (
+). -,
+ read «ln», .
+writeln .
+
+
+ 3.
+
+
+
+
< > < > <>
+ , 1990 2010. ,
+ , ,
+( , ).
+ .PT4Exam:
+
+
+uses PT4Exam;
+
+begin
+ Task('ExamTaskC25');
+
+end.
+
+
+
+
+year, . Pascal
+ , ,
+ : 1990..2010. ,
+ 0
+(, year
+ , , ,
+ ).
+year. ,
+ (, ) . ,
+ , ,
+ ().
+ , ,
+ .
+year ,
+ , .
+
+
+uses PT4Exam;
+var
+ n, i, k, m: integer;
+ year: array[1990..2010] of integer;
+begin
+ Task('ExamTaskC25');
+ for i := 1990 to 2010 do
+ year[i] := 0;
+ readln(n);
+ for i := 1 to n do
+ begin
+ readln(k, m); { k - , m - }
+ Inc(year[m]);
+ end;
+ for i := 1990 to 2010 do
+ writeln(i, ' ', year[i]);
+end.
+
+
+
+
+
+
+for i := 1990 to 2010 do
+ if year[i] > 0 then
+ writeln(i, ' ', year[i]);
+
+
+
+
+ 4.
+
+
+
+
+< > <> <> < 1 ( )>
+ 20 30 ;
+ . 92, 95 98.
+ 2000 3000. ;
+ . ,
+ M, (
+, ).
+ , — .
+ M , «».
+
+
+
+
+
+Street name max s
+ 30 Street.
+ ns, s.
+M, ,
+ . M, s0 p.
+, , ,
+ .
+s0 s, ,
+ max p. , max
+ p, max (
+ ).
+M ( ns ).
+ , «»;
+ s .
+ , ,
+, .
+
+
+
diff --git a/PABCNetHelp/ForEducation/CheckedTasks/ctfile.html b/PABCNetHelp/ForEducation/CheckedTasks/ctfile.html
new file mode 100644
index 000000000..ce8d6c601
--- /dev/null
+++ b/PABCNetHelp/ForEducation/CheckedTasks/ctfile.html
@@ -0,0 +1,343 @@
+
+
+
+
+uses PT4Exam;
+type
+ Street = record
+ name: string;
+ max: integer;
+ end;
+var
+ m, n, ns, i, j, k, p: integer;
+ s: array[1..30] of Street;
+ s0: string;
+ x: Street;
+ c: char;
+begin
+ Task('ExamTaskC53');
+ readln(m); { m - }
+ readln(n);
+ ns := 0;
+ for i := 1 to n do
+ begin
+ read(k);
+ if k <> m then
+ readln { }
+ else
+ begin
+ s0 := '';
+ read(c); { }
+ read(c); { }
+ while c <> ' ' do
+ begin
+ s0 := s0 + c;
+ read(c);
+ end;
+ read(c); { }
+ while c <> ' ' do
+ read(c); { }
+ readln(p); { }
+ { }
+ k := 0;
+ for j := 1 to ns do
+ if s[j].name = s0 then { s }
+ begin
+ k := 1;
+ if s[j].max < p then
+ s[j].max := p;
+ break;
+ end;
+ if k = 0 then { s }
+ begin
+ Inc(ns);
+ s[ns].name := s0;
+ s[ns].max := p;
+ end;
+ end;
+ end;
+ if ns = 0 then { }
+ writeln('')
+ else
+ begin
+ { ,
+ - }
+ for k := 1 to ns - 1 do
+ for i := 1 to ns - k do
+ if (s[i].max > s[i + 1].max) or
+ (s[i].max = s[i + 1].max) and
+ (s[i].name > s[i + 1].name) then
+ begin
+ x := s[i];
+ s[i] := s[i + 1];
+ s[i + 1] := x;
+ end;
+ { }
+ for i := 1 to ns do
+ writeln(s[i].max,' ',s[i].name);
+ end;
+end.
+
+
+
+ -
+
+
+ Shift+Ctrl+L. :
+
+
+
+
+
+
+
+uses PT4;
+
+begin
+ Task('File48');
+
+end.
+
+
+
+
+
, + . , + :
+ +
+
+uses PT4;
+var
+ i: integer;
+ s: string;
+ f: array [1..4] of file of integer;
+begin
+ Task('File48');
+ for i := 1 to 3 do
+ begin
+ read(s);
+ Assign(f[i], s);
+ end;
+end.
+
+
+
+ , .
+ s, ,
+ s,
+ ( Assign)
+
+ , .
, + . , + « »:
+ ++++
( ), + . +( ) + . , +( ) : + . + , , + , + ; + . ( , ) + . +
+ , 3 4, . ,
+ , ( ). ,
+ . « »:
++ ++
Assign Reset, :
+
+uses PT4;
+var
+ i: integer;
+ s: string;
+ f: array [1..4] of file of integer;
+begin
+ Task('File48');
+ for i := 1 to 4 do
+ begin
+ read(s);
+ Assign(f[i], s);
+ Reset(f[i]);
+ end;
+end.
+
+
+«Error System.IO.FileNotFoundException»:
+++ ++
, Error, , +(Runtime Error). Error ( System.IO.FileNotFoundException, + -, , ) + .
+ +« » + PascalABC.NET:
+++ ++
,
+ Reset, Rewrite,
+ . , , ,
+ Close. :
+
+uses PT4;
+var
+ i: integer;
+ s: string;
+ f: array [1..4] of file of integer;
+begin
+ Task('File48');
+ for i := 1 to 4 do
+ begin
+ read(s);
+ Assign(f[i], s);
+ if i < 4 then Reset(f[i])
+ else Rewrite(f[i]);
+ end;
+ { * }
+ for i := 1 to 4 do
+ Close(f[i]);
+end.
+
+
+ { * } , -
+ : Reset Rewrite Close.
; , .
+ , .
+ « »,
+ , , EOF: ( EOF
+ , , ):
++ ++
- .
+ : file of integer ,
+, file of real, .
, -
+ . , :
+ f integer real,
+ a real, ( , { * })
+ :
+
+for i := 1 to 3 do
+begin
+ read(f[i], a);
+ write(f[4], a);
+end;
+
+
++ ( ). , + ; , , + .
+:
+ +++ + ++
, , ,
+ . ,
+ file of real
+( 8 ), « », ,
+ ( 4 ).
+ « » 8 ,
+ .
, , , , + . , «» + .
+ + + real integer:
+
+uses PT4;
+var
+ i: integer;
+ s: string;
+ f: array [1..4] of file of integer;
+ a: integer;
+begin
+ Task('File48');
+ for i := 1 to 4 do
+ begin
+ read(s);
+ Assign(f[i], s);
+ if i < 4 then Reset(f[i])
+ else Rewrite(f[i]);
+ end;
+ for i := 1 to 3 do
+ begin
+ read(f[i], a);
+ write(f[4], a);
+ end;
+ for i := 1 to 4 do
+ Close(f[i]);
+end.
+
+
+
+, «» : + ( «»), :
+ +++ + ++
, ,
+File48:
+
+uses PT4;
+var
+ i, a: integer;
+ s: string;
+ f: array [1..4] of file of integer;
+begin
+ Task('File48');
+ for i := 1 to 4 do
+ begin
+ read(s);
+ Assign(f[i], s);
+ if i < 4 then Reset(f[i])
+ else Rewrite(f[i]);
+ end;
+ while not Eof(f[1]) do
+ for i := 1 to 3 do
+ begin
+ read(f[i], a);
+ write(f[4], a);
+ end;
+ for i := 1 to 4 do
+ Close(f[i]);
+end.
+
+
+ while not Eof(f[1]) do,
+ (,
+ ) .
+ « . 1 ( 5)»,
+ « !»:
++ + ++
« (F2)», + , F2, , + :
+
+
+File48 a08/09 12:43 .
+File48 a08/09 12:50 .
+File48 a08/09 12:52 .
+File48 a08/09 12:53 Error System.IO.FileNotFoundException.
+File48 a08/09 12:57 .--3
+File48 a08/09 13:06 !
+
+
+
+ Esc.
+ PascalABC.NET.
+ « | »,
+
+ Shift+Ctrl+R.
+
Dynamic : ,
+
+ TNode, PNode TNode:
+PNode = ^TNode. TNode PNode ;
+ Programming Taskbook ( TNode,
+ Dynamic):
+
+type
+ PNode = ^TNode;
+ TNode = record
+ Data: integer;
+ Next: PNode;
+ Prev: PNode;
+ . . .
+ end;
+
+
+Dynamic2 , + .
+ +- Dynamic2,
+ « | »,
+
+ Shift+Ctrl+L, :
+
+uses PT4;
+
+begin
+ Task('Dynamic2');
+
+end.
+
+
+
+
+++ + + ++
: .
+ + + , .
+ ; , ,
+ , Data
+ . ( ).
, :
+
+
+ P1
+ 75 - 65 - 22 - 26 - 10 >nil
+
+
+ , 5 , Data,
+ 75, Next , Data
+ 65, , , Data 10,
+ Next nil, .
+ , , ,
+ :
++ ++
, , + ( , + ).
+? . + , + . , + , , + , .
+ , , ,
+ P1, .
+
+P1 = ptr
+
+
+ P1 = , ,
+- , ptr , ,
+ read.
. : «ptr» «» +( )? , , , + , , .
+, ptr ,
+ , ( nil).
+, ,
+ .
+, «» ,
+ .
, ( )
+, ,
+ ( write).
+ , .
+Dynamic2. , ; + , + , , , , + .
+, , :
+
+
+uses PT4;
+var
+ p1: PNode;
+ n: integer;
+begin
+ Task('Dynamic2');
+ read(p1);
+ n := 0;
+ while p1 <> nil do
+ begin
+ write(p1^.Data);
+ n := n + 1;
+ p1 := p1^.Next;
+ end;
+ write(n);
+end.
+
+
+, , + - , + , « »:
+ +++ ++
+
+
+write(p1);
+
+
+ ,
+ nil.
+ , while p1 ,
+ :
++ ++
, p2,
+ , p1.
+ while
+ :
+uses PT4;
+var
+ p1,p2: PNode;
+ n: integer;
+begin
+ Task('Dynamic2');
+ read(p1);
+ n := 0;
+ while p1 <> nil do
+ begin
+ write(p1^.Data);
+ n := n + 1;
+ p2 := p1; { }
+ p1 := p1^.Next; { }
+ end;
+ write(n, p2);
+end.
+
+
+, « !»:
+ +++ ++
, -: +Dynamic3.
+, , + , , :
++++
, +( , ).
+, ? , , +Dynamic3, , :
+
+uses PT4;
+var
+ d: integer;
+ p1: PNode;
+begin
+ Task('Dynamic3');
+ read(d, p1);
+ write(p1);
+end.
+
+:
++++
, , + , . , , + , ( ) . . , + , , + .
+ Dynamic3 ,
+ New, ,
+( , ):
+uses PT4;
+var
+ d: integer;
+ p1, p2: PNode;
+begin
+ Task('Dynamic3');
+ read(d, p1);
+ New(p2);
+ p2^.Data := D;
+ p2^.Next := p1;
+ write(p2);
+end.
+
+:
+++ ++
+Dynamic5. + , , + .
+, + «» + , «», , .
++, , ( + 15):
++++
, + , :
+
+uses PT4;
+var p1: PNode;
+begin
+ Task('Dynamic5');
+ read(p1);
+ write(p1^.Data, p1^.Next);
+end.
+
++( « » « » ), + « », + , :
++++
+ Dispose, , p1:
+uses PT4;
+var p1: PNode;
+begin
+ Task('Dynamic5');
+ read(p1);
+ write(p1^.Data, p1^.Next);
+ Dispose(p1);
+end.
+
+:
+++ ++
+Dynamic30, + . -, + , «» , + :
+++ + ++
, , :
+-, =, -,
+nil<.
, ,
+ ( Next, ),
+ ( Prev), Prev
+ nil:
++ ++
+ Prev , :
+uses PT4;
+var
+ p1, p: PNode;
+begin
+ Task('Dynamic30');
+ read(p1);
+ p := p1^.Next;
+ while p <> nil do
+ begin
+ p^.Prev := p1;
+ p1 := p1^.Next;
+ p := p^.Next;
+ end;
+ write(p1); { }
+end.
+
+ Prev , .
+( , nil<):
+++
. «=» .
+, ,
+ , , :
+ P2
+nil< 33 = 64 - 78 = 12 = 51 >nil
+
+ , ,
+( Next , Prev
+ ).
while
+ :
+ p1^.Prev := nil;
+
+:
+++ + + ++
. Dynamic30 , + : +
+ +
+uses PT4;
+var
+ p1, p: PNode;
+begin
+ Task('Dynamic30');
+ p := nil;
+ read(p1);
+ while p1 <> nil do
+ begin
+ p1^.Prev := p;
+ p := p1;
+ p1 := p1^.Next;
+ end;
+ write(p);
+end.
+
+
+
+
+ , «»,
+ Next ( ,
+ Prev
+ ).
+Dynamic55,
+
+ .
- , + , «» , + :
+++ + ++
<< = = >>
+(, Prev Next
+ nil).
, , , + :
++++
Dynamic55 + :
+
+uses PT4;
+var
+ p1, p2: PNode;
+begin
+ Task('Dynamic55');
+ read(p1);
+ p2 := p1;
+ while p2^.Next <> nil do
+ p2 := p2^.Next;
+ p2^.Next := p1;
+ write(p2);
+end.
+
+«» , , + ( ). +( , , ):
+++ ++
write
+ :
+ p1^.Prev := p2;
+
+:
+++ + + ++
« (F2)», + , F2, , + :
+ +
+Dynamic2 a08/09 13:11 .
+Dynamic2 a08/09 13:15 .
+Dynamic2 a08/09 13:17 .
+Dynamic2 a08/09 13:20 !
+Dynamic3 a08/09 13:21 .
+Dynamic3 a08/09 13:24 .
+Dynamic3 a08/09 13:28 !
+Dynamic5 a08/09 13:29 .
+Dynamic5 a08/09 13:30 .
+Dynamic5 a08/09 13:31 !
+Dynamic30 a08/09 13:34 .
+Dynamic30 a08/09 13:42 .
+Dynamic30 a08/09 13:43 !
+Dynamic55 a08/09 13:54 .
+Dynamic55 a08/09 13:57 .
+Dynamic55 a08/09 13:58 !
+
+ Esc.
+ PascalABC.NET.
+ « | »,
+
+ Shift+Ctrl+R.
+
String9.
+-
+
+ « | »,
+
+ Shift+Ctrl+L. :
+uses PT4;
+
+begin
+ Task('String9');
+
+end.
+
+
+
+
+++ ++
char string ; , ,
+ (, 9) ,
+(, '9').
+ , , .
+
+
, +( , ): +
+
+
+uses PT4;
+var
+ n: integer;
+ c1, c2: char;
+begin
+ Task('String9');
+ read(c1, c2, n);
+end.
+
+
+
+, + . , + +« »:
+ +++ ++
, Programming Taskbook +: + ( ), . + , +, , , +.
+ , ,
+, ( ), read
+
+ . , (1)
+ , ,
+ .
+Programming Taskbook: -
+ .
+
, :
+
+
+ read(n, c1, c2);
+
+, - +, - :
++++
, , , . + : , + ( ). +
+ + ( ):
+
+uses PT4;
+var
+ n, i: integer;
+ c1, c2: char;
+ s: string;
+begin
+ Task('String9');
+ read(n, c1, c2);
+ s := '';
+ for i := 1 to n do
+ s := s + c1 + c2;
+ write(s);
+end.
+
+, s := '' ,
+ «» ( ,
+ #0,
+ '').
:
++++
, , , + . , + ; :
++++
. . ,
+ 1 99, 10000,
+, : 1*.
- . ,
+ , n
+ 2*n ( n, ).
+
+ :
+
+
+uses PT4;
+var
+ n, i: integer;
+ c1, c2: char;
+ s: string;
+begin
+ Task('String9');
+ read(n, c1, c2);
+ s := '';
+ for i := 1 to n div 2 do
+ s := s + c1 + c2;
+ write(s);
+end.
+
+« . 1 ( 5)», + « !»:
++++
. , , String9, + , :
+
+
+uses PT4;
+var
+ n, i: integer;
+ c1, c2: char;
+ s: string;
+begin
+ Task('String9');
+ read(n, c1, c2);
+ SetLength(s, n);
+ for i := 1 to n div 2 do
+ begin
+ s[2 * i - 1] := c1;
+ s[2 * i] := c2;
+ end;
+ write(s);
+end.
+
+ SetLength(s, n),
+ s. ,
+ ,
+ .
« (F2)», + , F2, , + :
+ +
+
+String9 a08/09 11:17 .
+String9 a08/09 11:18 .
+String9 a08/09 11:21 .
+String9 a08/09 11:26 .
+String9 a08/09 11:29 !
+
+
+ Esc.
+ PascalABC.NET.
+ « | »,
+
+ Shift+Ctrl+R.
+
Tree, Dynamic, :
+ ,
+ TNode, PNode TNode: PNode =
+^TNode. TNode PNode ;
+ Programming Taskbook.
+
, , + Tree2. +
+Tree2°. + P1 TNode . + Left Right ( ), +, , , , + Left Right nil ( nil Left Right). + . +
+, -
+
+ « | »,
+
+ Shift+Ctrl+L. :
+
+uses PT4;
+
+begin
+ Task('Tree2');
+end.
+
+
+++ + ++
+: . +
+ , .
+ . ,
+ ( ).
+ , . . Data TNode.
+ , ;
+ , .
+ , Left / Right nil.
+
+ , . + 15, 58, + 42, 4. +3 4; 3 15 11, 4 38 84. + + ( 55 20), : + ( 42, 87 60) ( 58). +
+, , + . + , , + , +, - ( , ). +
+ + + + +Tree2 , + ; + , . +
+ , ,
+ ( ).
+ ,
+ ( , ), ,
+ .
+, NodeCount(P), ,
+ P, : P nil,
+ 0;
+1 + NodeCount(P^.Left) + NodeCount(P^.Right)
+( ,
+ , ; ,
+ , ).
+
, : +
+
+uses PT4;
+function NodeCount(P: PNode): integer;
+begin
+ if P = nil then
+ result := 0
+ else
+ result := 1 + NodeCount(P^.Left) + NodeCount(P^.Right);
+end;
+var P1: PNode;
+begin
+ Task('Tree2');
+ read(P1);
+ write(NodeCount(P1));
+end.
+
+ NodeCount (),
+ Left Right nil. NodeCount,
+ : P1 ,
+ NodeCount(P1), write.
+
, « +!». +
+
+ , . , ,
+ ,
+ . ,
+ ,
+ . Parent.
+ , Parent nil.
+
, , . + Tree49. +
+Tree49°. + P1 , TNode, + Left Right. Parent TNode, + , + ( Left Right), + ( Parent). Parent nil. +
+-, Tree49, + «» , + , + , . +
+++ ++
, - , + . , , , + ; . + P1 + , + . +
+
+ Parent , .
+ P ,
+ Par :
+
+uses PT4;
+procedure SetParent(P, Par: PNode);
+begin
+ if P = nil then
+ exit;
+ P^.Parent := Par;
+ SetParent(P^.Left, P);
+ SetParent(P^.Right, P);
+end;
+var P1: PNode;
+begin
+ Task('Tree49');
+ read(P1);
+ SetParent(P1, nil);
+end.
+
+ SetParent
+ nil.
+
+. .
+, ,
+ , , , Parent
+(, nil).
+
TNode ,
+ ,
+( ;
+« »).
+ Tree86 , ,
+ .
+
Tree86°. + ( , + ) + TNode : Left + (. . ) , Right + , . . , . + Right nil, . + P1 . , + , P2 . +
+ ,
+ TNode ( ):
+
++ ++
( 13) (71, 73 29), + 71 , 73 (18, 93 92), + 29 (24 84). 46, + 93. +
+Tree86 , . +
++++
, : +, , , + , , . + +, , + , , . +
+, , , , + ( , + ). +
+ CreateNode(P).
+ P , .
+ ( , P = nil,
+ nil).
+ . ,
+( P ), ( P
+ ) .
+ P P1 P2. ,
+ P (, ),
+ P1, P2 nil.
+ P1 P2, , ,
+ . , Tree86.
+
+uses PT4;
+function CreateNode(P: PNode): PNode;
+var P1, P2: PNode;
+begin
+ if P = nil then
+ begin
+ result := nil;
+ exit;
+ end;
+ New(result);
+ result^.Data := P^.Data;
+ result^.Right := nil;
+ P1 := P^.Left;
+ P2 := P^.Right;
+ if P1 = nil then
+ begin
+ P1 := P2;
+ P2 := nil;
+ end;
+ { }
+ result^.Left := CreateNode(P1);
+ if P1 <> nil then
+ result^.Left^.Right := CreateNode(P2);
+end;
+var P1: PNode;
+begin
+ Task('Tree86');
+ read(P1);
+ write(CreateNode(P1));
+end.
+
+
+. , ,
+ ,
+ Right ( Right nil).
+ «» ;
+ Left .
+ , ,
+
+( ), ,
+ , .
+
, , +. , + , , . + , + .
+PascalABC.NET + +Programming Taskbook , , + ( , +, , + . .), + .
+, + PascalABC.NET? + , + . +
+1. Begin3 + Programming Taskbook.
+ Begin3,
+
+ :
+ - read
+write :
+ read
+( ,
+ ), write
+ . , ,
+ , ,
+ ;
+, .
+ ,
+ ,
+ ,
+ .
+
+ .
+3. String9 + Programming Taskbook.
++ . , , + .
+4. File48 + Programming Taskbook.
++ . + , +. , , + ; + . , + , +, . + .
+5. Dynamic + Programming Taskbook.
+, + . + ( ), + . + . + + .
+6. Tree + Programming Taskbook.
+ +. , , + , + . . +
+7. ExamBegin ExamTaskC + Programming Taskbook.
+, + . , + - +Pascal ( , Programming Taskbook). + ExamBegin, , + ExamTaskC, . +
+, Programming Taskbook, + + , 4.11. +
+ + + diff --git a/PABCNetHelp/ForEducation/Executors/DMa1.png b/PABCNetHelp/ForEducation/Executors/DMa1.png new file mode 100644 index 000000000..a0697da39 Binary files /dev/null and b/PABCNetHelp/ForEducation/Executors/DMa1.png differ diff --git a/PABCNetHelp/ForEducation/Executors/dmstart.html b/PABCNetHelp/ForEducation/Executors/dmstart.html new file mode 100644 index 000000000..a7bb48efb --- /dev/null +++ b/PABCNetHelp/ForEducation/Executors/dmstart.html @@ -0,0 +1,71 @@ + + + + + +, , +:
+
, +, , +. , +.
+
+ Drawman:
+
++ToPoint(x,y)+(x,y);+
+ OnVector(a,b)(a,b);;
+ PenUp. +
+ PenDown
+ :
+
+uses Drawman;
+begin
+ Task('c1');
+end.
+
++.
+ Task ,
+ Drawman
+ .
+:
+++a;;
+ c;
+ cc;
+ p. +
+ pp
20 x 30
+ StandardField ,
+ N x M Field(N,M).
, + . , + . +
++ + . PascalABC.NET + +, . . , . . + . . +« 79 », ., 2001. , + , + + , .
+, PascalABC.NET + + PascalABC.NET.
+. a1 + +.
+ + + + diff --git a/PABCNetHelp/ForEducation/Executors/robotstart.html b/PABCNetHelp/ForEducation/Executors/robotstart.html new file mode 100644 index 000000000..49eb5ac10 --- /dev/null +++ b/PABCNetHelp/ForEducation/Executors/robotstart.html @@ -0,0 +1,114 @@ + + + + + ++ . , + . + .
+, , +:
+
, + , , .
+
+ Robot:
+
++Right+ ;;
+ Left; +
+ Up; +
+ Down;
+ Paint
+ WallFromLeftTrue+ ; +
+ WallFromRightTrue+ ; +
+ WallFromUpTrue+ ; +
+ WallFromDownTrue+ ; +
+ FreeFromLeftTrue+ ; +
+ FreeFromRightTrue+ ; +
+ FreeFromUpTrue+ ; +
+ FreeFromDownTrue+ ; +
+ CellIsPaintedTrue+ , , ; +
+ CellIsFreeTrue+ , , . +
+ :
+
+uses Robot;
+begin
+
+ Task('c1');
+end.
+
+ Task ,
+ Robot
+ .
:
+++a;;
+ c;
+ if;
+ w+ ;
+ if-;
+ count;
+ cc;
+ p. +
+ pp
9 x 11
+ StandardField ,
+ N x M Field(N,M).
+ .
| + + DMTaskMaker | +
+++
type TaskProcType = + procedure;
, .
+ ;
+ RegisterTask, .
+
| + + DMTaskMaker | +
+++
procedure Field(szx,szy: integer);
szx
+ szy .
+++
procedure DoToPoint(x,y: integer);
-
+ (x, y).
+++
procedure DoOnVector(dx,dy: integer);
-
+ (x, y).
+++
procedure DoPenUp;
- .
+ ++++
procedure DoPenDown;
- .
+ ++++
procedure TaskText(s: string);
s.
+
+++
procedure RegisterGroup(name,description,unitname: string; count: integer);
PT4Load.
+ PT4Load ,
+,
+ - .
+ name,
+ description,
+ unitname, , count.
+ 7 ( ) ,
+ 999.
+ RegisterGroup
+ , .
+
++
procedure RegisterTask(name: string; p: TaskProcType);+
name p, .
+ .
+ RegisterGroup, RegisterTask
+, . .
+
+ . DMTasks.pas +:
++++
unit DMTasks;+
interface+
uses DMTaskMaker;+
implementation+
procedure FirstDM;
+ var i,a: integer;
+ begin
+ TaskText(' mydm1. , ');
+ Field(14,8);
+ DoToPoint(7,7);
+ a:=6;
+ for i:=1 to 6 do
+ begin
+ DoPenDown;
+ DoOnVector(a,-a);
+ DoOnVector(-a,a);
+ DoOnVector(-a,-a);
+ DoOnVector(a,a);
+ Dec(a);
+ DoPenUp;
+ DoOnVector(0,-1);
+ end;
+ end;+
begin
+ RegisterGroup('mydm',' ','DMTasks',2);
+ RegisterTask('mydm1',FirstDM);
+ end.
( - ):
++++
uses Drawman, + DMTasks;
+ begin
+ Task('mydm1');
+ end.
:
+:
++++
procedure DoCross;
+begin
+ DoPenDown;
+ DoOnVector(1,0); DoOnVector(0,-1);
+ DoOnVector(1,0); DoOnVector(0,-1);
+ DoOnVector(-1,0); DoOnVector(0,-1);
+ DoOnVector(-1,0); DoOnVector(0,1);
+ DoOnVector(-1,0); DoOnVector(0,1);
+ DoOnVector(1,0); DoOnVector(0,1);
+ DoPenUp;
+end;+
procedure SecondDM;
+begin
+ TaskText(' mydm2. , Cross');
+ Field(18,12);
+ DoToPoint(3,8);
+ DoCross;
+ DoToPoint(8,4);
+ DoCross;
+ DoToPoint(12,11);
+ DoCross;
+ DoToPoint(15,6);
+ DoCross;
+end;
; :
++++
begin
+ RegisterGroup('mydm',' ','DMTasks',2);
+ RegisterTask('mydm1',FirstDM);
+ RegisterTask('mydm2',SecondDM);
+ end.
:
++++
uses Drawman, + DMTasks;
+ begin
+ Task('mydm2');
+ end.
:
+
+ DMTasks
+ - PT4Load.
+
+PT4Load
+DM «», :
+
+
, mydm .
+mydm1:
+
+
Enter + DMmydm1.pas :
++++
uses Drawman, + DMTasks;
+
+ begin
+ Task('mydm1');
+
+ end.
:)
+ + + diff --git a/PABCNetHelp/ForEducation/MakeModules/RobotMake.html b/PABCNetHelp/ForEducation/MakeModules/RobotMake.html new file mode 100644 index 000000000..8fabc6313 --- /dev/null +++ b/PABCNetHelp/ForEducation/MakeModules/RobotMake.html @@ -0,0 +1,131 @@ + + + + + +| + + RobotTaskMaker | +
+++
type TaskProcType = + procedure;
, .
+ ;
+ RegisterTask, .
+
| + + RobotTaskMaker | +
+++
procedure Field(szx,szy: integer);
szx
+ szy .
+++
procedure HorizontalWall(x,y,len: integer);
len
+ (x,
+y).
+++
procedure VerticalWall(x,y,len: integer);
len
+ (x,
+y).
+++
procedure RobotBegin(x,y: integer);
(x,
+y).
+++
procedure RobotEnd(x,y: integer);
(x,
+y).
+++
procedure RobotBeginEnd(x,y,x1,y1: integer);
(x,
+y) (x1,
+y1).
+++
procedure Tag(x,y: integer);
(x,
+y) .
+++
procedure TagRect(x,y,x1,y1: integer);
,
+ (x,
+y) (x1,
+y1),
+.
+++
procedure MarkPainted(x,y: integer);
(x,
+y) (
+ ).
+++
procedure TaskText(s: string);
s.
+++
procedure RegisterGroup(name,description,unitname: string; count: integer);
PT4Load.
+ PT4Load , ,
+ - .
+ name,
+ description,
+ unitname, , count.
+ 7 ( ) ,
+ 999.
+ RegisterGroup
+ , .
+
++
procedure RegisterTask(name: string; p: TaskProcType);+
name p, .
+ .
+ RegisterGroup, RegisterTask
+, . .
+
+ . RobTasks.pas +:
++++
unit RobTasks;+
interface+
uses RobotTaskMaker;+
implementation+
procedure FirstRob;
+ begin
+ TaskText(' myrob1. ');
+ Field(10,6);
+ HorizontalWall(0,3,4);
+ VerticalWall(4,3,2);
+ RobotBegin(1,4);
+ VerticalWall(5,1,5);
+ HorizontalWall(5,1,4);
+ RobotEnd(6,2);
+ Tag(6,2);
+ end;+
begin
+ RegisterGroup('myrob',' ','RobTasks',2);
+ RegisterTask('myrob1',FirstRob);
+ end.
( - ):
++++
uses Robot, RobTasks;
+ begin
+ Task('myrob1');
+ end.
: +
++ , :
++++
procedure SecondRob;
+ var n,i: integer;
+ begin
+ TaskText(' myrob2. ');
+ n:=Random(4)+7;
+ Field(n,4);
+ RobotBeginEnd(1,3,n,3);
+ MarkPainted(n,2);
+ Tag(n,3);
+ for i:=2 to n-1 do
+ if Random(3)=1 then
+ begin
+ MarkPainted(i,2);
+ Tag(i,3);
+ end;
+ end;
; :
++++
begin
+ RegisterGroup('myrob',' ','RobTasks',2);
+ RegisterTask('myrob1',FirstRob);
+ RegisterTask('myrob2',SecondRob);
+ end.
:
++++
uses Robot, RobTasks;
+ begin
+ Task('myrob2');
+ end.
:
+
+ DMTasks
+ - PT4Load.
+
+PT4Load
+RB «», :
+
+
, myrob .
+myrob1:
+
Enter + RBmyrob1.pas :
++++
uses Robot, RobTasks;
+
+ begin
+ Task('myrob1');
+
+ end.
:)
+ + + diff --git a/PABCNetHelp/ForEducation/MakeModules/default.css b/PABCNetHelp/ForEducation/MakeModules/default.css new file mode 100644 index 000000000..440ee83a0 --- /dev/null +++ b/PABCNetHelp/ForEducation/MakeModules/default.css @@ -0,0 +1,241 @@ +BODY, +TABLE, +TD { + font-family: Arial, sans-serif; + background-color: #ffffff; + font-size: small; +} + + +code { + color: #000080; + font-size: small; + text-align: left +} + + +pre { + color: #000080; + font-size: small; + text-align: left + text-indent: 30pt; + margin-left: 30pt; + margin-top: 3pt; + margin-bottom: 0pt; +} + + + + +code.codeit { + color: #000000; + font-family: Times; + font-style: italic; + font-size: small; + text-align: left +} + +H1 { + font-family: Arial, sans-serif; + font-weight: bold; + margin-top: 6pt; + margin-bottom: 6pt; + font-size: large; + color: #000080; + text-align: left +} + +H2 { + font-family: Arial, sans-serif; + font-weight: bold; + font-style: italic; + margin-bottom: 2pt; + margin-top: 6pt; + font-size: medium; + color: #000080; + text-align: left +} + +H3 { + font-family: Arial, sans-serif; + margin-bottom: 2pt; + margin-top: 6pt; + font-size: medium; + color: #000080; + text-align: left +} + +H4 { + font-weight: bold; + margin-top: 6pt; + margin-bottom: 2pt; + font-size: small; + text-align: left +} + +H5 { + font-size: 10.0pt; +} + +H6 { + font-size: 10.0pt; +} + +P { + margin-top: 3pt; + margin-bottom: 0pt; + font-family: Arial, sans-serif; + font-size: small; + text-indent: 30pt; + text-align: justify +} + +P.task { + margin-top: 3pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + font-family: Arial, sans-serif; + font-size: small; + text-indent: 30pt; + text-align: justify; + border-style: solid; + border-width: 1pt; +} + +P.remark { + margin-top: 3pt; + margin-bottom: 0pt; + margin-left: 30pt; + margin-right: 0pt; + font-family: Arial, sans-serif; + font-size: small; + text-indent: 0pt; + text-align: justify; +} + + + +P.ris { + font-family: Arial; + margin-top: 3pt; + margin-bottom: 0pt; + font-family: Arial, sans-serif; + font-size: small; + color: #000080; + text-indent: 0pt; + text-align: center +} + + + +H1.part { + color: #000000; + margin-top: 20pt; + margin-bottom: 20pt; + text-align: center + +} + +H1.part1 { + color: #000000; + margin-top: 80pt; + margin-bottom: 20pt; + text-align: center + +} + +H1.part2{ + color: #000000; + font-size: medium; + margin-top: 0pt; + margin-bottom: 20pt; + text-align: center +} + + + +H3.tit { + color: #000000; + margin-top: 10pt; + margin-bottom: 10pt; + text-align: center +} + +H2.subpart { + color: #000000; + margin-bottom: 80pt; + margin-top: 20pt; + text-align: center +} + +P.author { + margin-top: 0pt; + margin-bottom: 0pt; + font-family: Arial, sans-serif; + font-size: 9pt; + color: #000000; + text-indent: 0pt; + text-align: right +} + +P.refs { + margin-top: 0pt; + margin-bottom: 3pt; + font-family: Arial, sans-serif; + font-size: 10pt; + color: #000000; + text-indent: 0pt; + text-align: center +} + +P.foot { + margin-top: 0pt; + margin-bottom: 0pt; + font-family: Arial, sans-serif; + font-size: 9pt; + font-style: italic; + color: #000000; + text-indent: 0pt; + text-align: right +} + + + +OL, +UL { + margin-top: 3pt; + margin-bottom: 0pt; + font-size: small; + font-family: Arial, sans-serif; + text-align: justify +} + + +SPAN.tsktitle +{ + font-family: Arial, sans-serif; + font-weight: bold; + font-size: small; + +} + + + +P.tsk{text-align:justify;text-indent:-50;margin-top:5; margin-left:60;} +P.hnt{text-align:justify;margin-left:60;} +P.hntc{text-align:justify;margin-left:60;text-indent:0;margin-top:0;} +P.hntq{text-align:justify;margin-left: 60;margin-top:0;} +P.cmt{text-align:justify;margin-top:5;} +P.ttt{text-align:left;} +P.cnt{text-align:center;} +P.qte{ + color: #000080; + font-size: small; + text-indent:0; +text-align:left;margin-left:120;margin-top:0;margin-bottom:0;} +blockquote{font-family: Arial, sans-serif;text-align:justify;margin-left:100;margin-top:0; margin-bottom:0;} +P.cmtc{text-align:justify;} +P.cmtq{text-align:justify;} +SUB{font-family: Arial, sans-serif;;font-size:x-small;} +SUP{font-family: Arial, sans-serif;;font-size:x-small;} diff --git a/PABCNetHelp/ForEducation/MakeModules/images/demo_3.png b/PABCNetHelp/ForEducation/MakeModules/images/demo_3.png new file mode 100644 index 000000000..c46e75a5e Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/demo_3.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/dmmake1.PNG b/PABCNetHelp/ForEducation/MakeModules/images/dmmake1.PNG new file mode 100644 index 000000000..ca89dfc2d Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/dmmake1.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/dmmake2.PNG b/PABCNetHelp/ForEducation/MakeModules/images/dmmake2.PNG new file mode 100644 index 000000000..fb391f56c Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/dmmake2.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/dmmake3.PNG b/PABCNetHelp/ForEducation/MakeModules/images/dmmake3.PNG new file mode 100644 index 000000000..64af43037 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/dmmake3.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/dmmake4.PNG b/PABCNetHelp/ForEducation/MakeModules/images/dmmake4.PNG new file mode 100644 index 000000000..9af067d7b Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/dmmake4.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/load.gif b/PABCNetHelp/ForEducation/MakeModules/images/load.gif new file mode 100644 index 000000000..3006fc44e Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/load.gif differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4exam1.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam1.png new file mode 100644 index 000000000..8e99a2b0e Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam1.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4exam1a.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam1a.png new file mode 100644 index 000000000..d7af1719d Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam1a.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4exam2.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam2.png new file mode 100644 index 000000000..c8801f17c Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam2.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4exam3.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam3.png new file mode 100644 index 000000000..ab28145d6 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam3.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4exam4.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam4.png new file mode 100644 index 000000000..c9c13caa4 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam4.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4exam5.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam5.png new file mode 100644 index 000000000..86f33b323 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4exam5.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make1.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make1.png new file mode 100644 index 000000000..cfbc6914c Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make1.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make10.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make10.png new file mode 100644 index 000000000..d71878a52 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make10.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make11.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make11.png new file mode 100644 index 000000000..3b2130368 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make11.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make12.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make12.png new file mode 100644 index 000000000..c73249554 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make12.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make13.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make13.png new file mode 100644 index 000000000..b12d3f539 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make13.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make14.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make14.png new file mode 100644 index 000000000..578e8d017 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make14.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make15.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make15.png new file mode 100644 index 000000000..54f1d6b38 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make15.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make16.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make16.png new file mode 100644 index 000000000..4f89ab446 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make16.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make17.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make17.png new file mode 100644 index 000000000..ee213afd3 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make17.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make18.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make18.png new file mode 100644 index 000000000..1b96f9c02 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make18.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make2.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make2.png new file mode 100644 index 000000000..606d9ef08 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make2.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make3.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make3.png new file mode 100644 index 000000000..1bd6221f1 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make3.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make4.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make4.png new file mode 100644 index 000000000..717e1f670 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make4.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make5.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make5.png new file mode 100644 index 000000000..74c259939 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make5.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make6.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make6.png new file mode 100644 index 000000000..8e3d3a6eb Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make6.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make6a.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make6a.png new file mode 100644 index 000000000..992fc2167 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make6a.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make7.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make7.png new file mode 100644 index 000000000..408448081 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make7.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make8.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make8.png new file mode 100644 index 000000000..854d4b073 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make8.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/pt4make9.png b/PABCNetHelp/ForEducation/MakeModules/images/pt4make9.png new file mode 100644 index 000000000..359770cb9 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/pt4make9.png differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/rbmake1.PNG b/PABCNetHelp/ForEducation/MakeModules/images/rbmake1.PNG new file mode 100644 index 000000000..60552c2d7 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/rbmake1.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/rbmake2.PNG b/PABCNetHelp/ForEducation/MakeModules/images/rbmake2.PNG new file mode 100644 index 000000000..32f2e1cee Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/rbmake2.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/rbmake3.PNG b/PABCNetHelp/ForEducation/MakeModules/images/rbmake3.PNG new file mode 100644 index 000000000..c078a3f94 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/rbmake3.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/images/rbmake4.PNG b/PABCNetHelp/ForEducation/MakeModules/images/rbmake4.PNG new file mode 100644 index 000000000..0772d3422 Binary files /dev/null and b/PABCNetHelp/ForEducation/MakeModules/images/rbmake4.PNG differ diff --git a/PABCNetHelp/ForEducation/MakeModules/index.html b/PABCNetHelp/ForEducation/MakeModules/index.html new file mode 100644 index 000000000..21f44572b --- /dev/null +++ b/PABCNetHelp/ForEducation/MakeModules/index.html @@ -0,0 +1,36 @@ + + + + + +PascalABC.NET + , + Programming Taskbook. + RobotTaskMaker, DMTaskMaker +PT4TaskMaker; RobotTaskMaker DMTaskMaker + , PT4TaskMaker + PT4TaskMakerNET. + :
+4.10, Programming Taskbook + Pascal C++ + , : ExamBegin ExamTaskC. + , + -, +. Exam - + . , + , , , + , +. +
+PT4TaskMaker + , . + , . +
+ +, PascalABC.NET ExamDemo. +, , , + , , C++ Pascal Delphi Lazarus, + , . + C#, . +
+ +, , . + , + . +
+, , + , 14, . +
+ +( , 9 + ), 1 +( Exam), + ExamDemo. PT4ExamDemo. +
+ExamDemo Exam, . + ExamBegin ExamBegin71 ExamBegin72, + « » + . + ExamTaskC 12 ExamTaskC25ExamTaskC36, + : . +
+, + 2 3 , ( PT4ExamDemo.pas): +
+library PT4ExamDemo;
+
+uses PT4TaskMakerNET;
+
+procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('ExamBegin', 70 + num);
+ 3..14: UseTask('ExamTaskC', 22 + num);
+ end;
+end;
+
+procedure inittaskgroup;
+begin
+ if (CurrentVersion < '4.10') or
+ (CurrentLanguage and (lgPascal or lgCPP) = 0) then
+ exit;
+ CreateGroup('ExamDemo', '^ : ',
+ '. . , 2013', 'qdfedsag33gbg45j', 14, InitTask);
+ CommentText('\P ');
+ CommentText(' -, ');
+ CommentText(', ');
+ CommentText(' : ');
+ CommentText('\MRead\m/\MReadln\m\:\MWrite\m/\MWriteln\m ');
+ CommentText('Pascal, \Mcin\m\:\Mcout\m C++.');
+end;
+
+procedure activate(S: string);
+begin
+ ActivateNET(S);
+end;
+
+begin
+end.
+
+. PT4TaskMakerNET, + PascalABC.NET. + +InitTask, . + , + UseTask, + . + 71 72 ExamBegin 2536 + ExamTaskC ( 14 ). +
+ . inittaskgroup
+( , . . ).
+ CreateGroup,
+ :
+ ('ExamDemo'), ('^ : '), ,
+ , (14) (InitTask).
+
, 4.10 + Pascal ++, CreateGroup + . , + inittaskgroup, ExamDemo . +
+- «^» - . + + PT4Demo PT4Load ( «^» +, «: : + »). +
+, 3, ,
+ :
+ - (
+ CommentText).
+ \M\m, .
+
inittaskgroup activate +( ), + ActivateNET, PT4TaskMakerNET. +
+, + PT4TaskMakerNET. PascalABC.NET + LIB PascalABC.NET, + . +
+, + , + . + PT4Load, + [Shift]+[Ctrl]+[L] «»; +: ExamDemo1. ExamDemo1.pas : +
+uses PT4Exam;
+
+begin
+ Task('ExamDemo1');
+
+end.
+
+, + PT4, PT4Exam, , . +
+ ,
+ , ,
+ Task «?»: Task('ExamDemo?').
+
ExamDemo14: +
+
+
, + 4.11 , . + , + ( , ), + . +[F4]. : +
+
+
+( [Enter] [Backspace], + (. . «») . + , PascalABC.NET. +, +, . +
+ c html- ( , ,
+ ), Task «?»
+ «#»: Task('ExamDemo#').
+ ExamDemo14
+ html- :
+
+
. , + ExamBegin, . + ( ), + + . , + , . + , + . , , + ExamDemo2 (. , ). + +, ExamDemo2. +
+, + , . +
++ : +
+function RandR(a, b: integer): real; +begin + result := RandomN(a*100, b*100)/100; +end; ++
RandR RandomN, + , 4.11 ( RandomN(M, N) + , M..N, ). +RandR(a, b) (a b ) , a..b + . + +; , , + . , 4.11 + RandomR, , + , +, . +
+, , + , : +
+procedure SwapR(var a, b: real); +var + c: real; +begin + c := a; + a := b; + b := c; +end; ++
Exam, + 5 (. ). : +
+, Exam : +
+3, . + Exam. + , (StartExam) + 12, (EndExam) 46. + , + : +
+var + f1,f2: text; + f1name, f2name: string; + +procedure StartExam; +var + s: string; +begin + Str(RandomN(10000, 99999), s); + f1name := 'pt1' + s + '.tst'; + f2name := 'pt2' + s + '.tst'; + Assign(f1, f1name); + Rewrite(f1); + Assign(f2, f2name); + Rewrite(f2); +end; + +procedure EndExam; +begin + Close(f1); + Close(f2); + DataS(f1name, 3, 1); + DataS(f2name, 45, 1); + DataFileT(f1name, 1, 5); + ResultFileT(f2name, 1, 5); +end; ++
. , StartExam, + pt1#####.tst ( +) pt2#####.tst ( ), , «#», + , . : + , .tst, + . , .tst + . +
+EndExam , + ( . +DataFileT) +, , + , (. +DataS). + , + , . + Exam , + - + («» ), + . +
+, StartExam EndExam + : + StartExam, f1 f2 , , + EndExam. +
+. , + Exam1, m: m = 1 + , m = 2 : +
+procedure Exam1(m: integer);
+var
+ n, i: integer;
+ a: array[1..10] of real;
+begin
+ CreateTask(' ');
+ case m of
+ 1:
+ begin
+ TaskText(' {N},', 0, 1);
+ TaskText(' \= {N} . ', 0, 2);
+ TaskText(' , , .\,. ', 0, 3);
+ TaskText(' , ', 0, 4);
+ TaskText(' 7 .', 0, 5);
+ end;
+ 2:
+ begin
+ TaskText(' {N},', 0, 2);
+ TaskText(' \= {N} . ', 0, 3);
+ TaskText(' . ', 0, 4);
+ TaskText(' , 7 .', 0, 5);
+ end;
+ end;
+ StartExam;
+ n := 2 * RandomN(1, 5);
+ for i := 1 to n do
+ a[i] := RandR(-99, 99);
+ writeln(f1,n);
+ for i := 1 to n - 1 do
+ write(f1, a[i]:0:2, ' ');
+ writeln(f1, a[n]:0:2);
+ for i := 1 to n div 2 do
+ case m of
+ 1: SwapR(a[2*i - 1], a[2*i]);
+ 2: SwapR(a[i], a[i + n div 2]);
+ end;
+ for i := 1 to n do
+ write(f2, a[i]:7:2);
+ writeln(f2);
+ EndExam;
+ SetTestCount(3);
+end;
+
+, CreateTask , + « ». + , ExamBegin71 ExamBegin72. +
+10; +, . +
+. + -99 99, + 6 . +
+ ,
+ ExamBegin ExamTaskC.
+ ,
+: «:0:2». , ,
+ 7
+( ExamBegin ExamTaskC,
+ ). : «:7:2».
+
, + . , + SetTestCount. +
+Exam1 ( , 1 2) + InitTask, . + ExamBegin71 ExamBegin72, + « ». + 12 2: +
+procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('ExamBegin', 70 + num);
+ 3..4: Exam1(num - 2);
+ 5..16: UseTask('ExamTaskC', 20 + num);
+ end;
+end;
+
+2 CreateGroup, + ( 16). +
+
+ Task
+ «#» «?»: Task('ExamDemo?').
+
[F9] -, + , . ExamDemo4 +(, Exam1 , 2): +
+
+
ExamDemo 12 , + ExamTaskC. ; + , . + , , + . +
+: + ( ) + . , , + ( + ). : + . +
+( ), + ( ). + , + . , , + , ( + , , + ; , + , + ). +
+40 +( , PascalABC.NET + ): +
+const
+ famcount = 40;
+var
+ fam: array[1..famcount] of string :=
+ ('', '', '', '', '',
+ '', '', '', '', '',
+ '', '', '', '', '',
+ '', '', '', '', '',
+ '', '', '', '', '',
+ '', '', '', '', '',
+ '', '', '', '', '',
+ '', '', '', '', '');
+
+, , + m, 1 2: +
+procedure Exam2(m: integer);
+var
+ n, i, y, num, max, k: integer;
+ a: array[1..100] of integer;
+ nums: array[1..10] of integer;
+begin
+ CreateTask(' ');
+ case m of
+ 1:
+ begin
+ TaskText(' . ',0,1);
+ TaskText(' {N}, {N} ',0,2);
+ TaskText('\(\M< > <> < >\m\)',0,3);
+ TaskText(' , 1990',0,4);
+ TaskText(' 2010. , ,',0,5);
+ TaskText(' ( ',0,0);
+ TaskText(' , ). ',0,0);
+ TaskText(' .',0,0);
+ k := 1;
+ for i := 1 to 100 do
+ a[i] := 2100;
+ end;
+ 2:
+ begin
+ TaskText(' . ',0,1);
+ TaskText(' {N}, {N} ',0,2);
+ TaskText('\(\M< > <> < >\m\)',0,3);
+ TaskText(' , 1990',0,4);
+ TaskText(' 2010. , ,',0,5);
+ TaskText(' ( ',0,0);
+ TaskText(' , ). ',0,0);
+ TaskText(' ,',0,0);
+ TaskText(' \= .',0,0);
+ k := -1;
+ for i := 1 to 100 do
+ a[i] := 0;
+ end;
+ end;
+ StartExam;
+ if Random(2)=0 then
+ n := RandomN(50, 100)
+ else
+ n := RandomN(10, 20);
+ case CurrentTest of
+ 1: n := RandomN(10, 20);
+ 2: n := RandomN(50, 100);
+ end;
+ if n <= 20 then
+ for i := 1 to 10 do
+ nums[i] := RandomN(1, 100);
+ writeln(f1,n);
+ for i := 1 to n do
+ begin
+ y := RandomN(1990, 2010);
+ if n <= 20 then
+ num := nums[RandomN(1, 10)]
+ else
+ num := RandomN(1, 100);
+ case m of
+ 1: writeln(f1, y, ' ', fam[RandomN(1, famcount)],' ', num);
+ 2: writeln(f1, num, ' ', fam[RandomN(1, famcount)],' ', y);
+ end;
+ if k*a[num] > k*y then
+ a[num] := y;
+ end;
+ case m of
+ 1: for i := 1 to 100 do
+ if a[i] < 2100 then
+ writeln(f2, i, ' ', a[i]);
+ 2: while true do
+ begin
+ max := 0;
+ for i := 1 to 100 do
+ if a[i] > max then
+ begin
+ max := a[i];
+ num := i;
+ end;
+ if max = 0 then
+ break
+ else
+ begin
+ writeln(f2, max, ' ', num);
+ a[num] := 0;
+ end;
+ end;
+ end;
+ EndExam;
+ SetTestCount(5);
+end;
+
+. + . , + . + ExamTaskC, . +
+TaskText 0. + , + , , + . + . +
+: a () , + nums ( ). + , + + . +
+n. +, , ( «»), + «» + . + CurrentTest, 4.11 +PT4TaskMaker, «» : + + ( + ), ( + « »). ( + ) n + 10..20, 50..100. +
+n (1020) + : + 1100, + + , +/ . , nums 10 +, 10 , + . +
+, , . + , + . , , +( ), + , +( ), + . + , + ( ), +( ExamTaskC). +
+a + , , + «» ( 0). + , + a ( ). +, , + , . +
+: +() ( ), () +( ). + + , a + , . +
+Exam2 . +
+Exam2 case InitTask, + 17 18: +
+ +procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('ExamBegin', 70 + num);
+ 3..4: Exam1(num - 2);
+ 5..16: UseTask('ExamTaskC', 20 + num);
+ 17..18: Exam2(num - 16);
+ end;
+end;
+
+, CreateGroup, +, 18. +
+[F9] +( ): +
+
+
«?» «# » + Task , + [F9] html- , + , : +
+ +
+
CreateTask + ( ), + : ExamDemo3 ExamDemo4 +« », ExamDemo17 ExamDemo18 +« ». +
+ + + + + + diff --git a/PABCNetHelp/ForEducation/MakeModules/tmaker_format.html b/PABCNetHelp/ForEducation/MakeModules/tmaker_format.html new file mode 100644 index 000000000..1a24f4b81 --- /dev/null +++ b/PABCNetHelp/ForEducation/MakeModules/tmaker_format.html @@ -0,0 +1,1650 @@ + + + + + + PT4TaskMaker ,
+ .
+(),
+ \.
+
+ , + : +
+, + html- . ( , ) + , . +
+, , , + ( ) + html- . : +
+, html- Task,
+ ( ) #. , html-
+ PT4Demo,
+ .
+
, , + ( S TaskText), +( Cmt Data Result), + () +( S CommentText). +
+, Data Result, + (. « »). + , S CommentText, + html- (. «Html-»). + , S TaskText, + , html-. +
+ \, ,
+ , html-.
+
, CreateTask +( SubgroupName), + , CreateGroup ( GroupDescription), + . + , html-. + (–) (—) + : -- ---. 4.10, + html- . +
++
, + ( UseTask), + , + . , , + . + , , + . + «» , + + UseTask. +
+, + html-, + ( , TeX, + ). + : +
+=, <, > ~;
+ (> 0),
+ : (>\,0);
+~ : ~{a} ~{b};
++ \;;
+\* / ;
+ , ;
+ .
+( Begin39; + , , , + ): +
+TaskText(' \I \i ' +
+ '{A}\*{x}^2\;+\;{B}\*{x}\;+\;{C}~=~0, ', 0, 1);
+TaskText(' ~{A}, {B}, {C} ' +
+ '(~{A} ~0), ,', 0, 2);
+TaskText(' . ' +
+ ' , ',0,3);
+TaskText(' . ' +
+ ' ', 0, 4);
+TaskText('\[{x}_{1,\,2}~=~(\-{B}\;\+\;\R{D}\r)/(2\*{A}),\] ' +
+ ' {D}~\= \I\i, ' +
+ ' {B}^2\;\-\;4\*{A}\*{C}.', 0, 5);
+
+: +
+
html- : +
+
\< \>.
+
\t, \f, \N, \O
+ , ,
+ .
+
, \q, \Q, \P, \[, \(,
+\], \), \| &,
+( html-).
+
, \S \s,
+ , html-
+ ,
+ ,
+( html- «Begin39»).
+ , (,
+ , ,
+ «» ).
+
{ } ,
+ html-.
+ ,
+ .
+
,
+ .
+ .
+ \I, \B, \S ,
+ .
+
. , + TaskText CommentText, , . + ( ), + , TaskText CommentText. +
+ + r, l, c
+ (r ,
+l , c ).
+ .
+( \,).
+
, , +( If26): +
+TaskText(' ~{x} ' +
+ ' ~{f},', 0, 1);
+TaskText(' :', 0, 2);
+TaskText('\[\Jrcrl&\,&\,& \-{x},& {x}~\l~0,',
+ 26, 3);
+TaskText('&{f}({x})&~=~&{x}^2,& 0~<~{x}~<~2,', 26, 4);
+TaskText('&\,&\,& 4,& {x}~\g~2.\j\]', 26, 5);
+
+: +
+
html- : +
+
\| ,
+( ).
+ html- , ,
+ ( ) .
+
, + : , , + . + TaskText X + ( ), 26 + , +. +
++ TaskText, 4.11. + , + , (#13 #10). + + , , +, , +. , TaskText + . + + , , + \, + . ( + ) . + , + TaskText ( + , ; + ): +
+TaskText(' ~{x} ~{f},'#13 +
+' :'#13 +
+'\[\Jrcrl&\,&\,& \-{x},& {x}~\l~0, \ '#13 +
+'&{f}({x})&~=~&{x}^2,& 0~<~{x}~<~2, \ '#13 +
+'&\,&\,& 4,& {x}~\g~2.\j\] \ ');
+
+ \P .
+ , , ( , ).
+ ,
+ html- . \P html- ,
+ .
+
«» \h \H,
+ ,
+ ANSI Latin-1 ( \h)
+ Windows- Symbol ( \H).
+ ,
+ ; A, B, C, D, E, F .
+ ,
+ «?» ( ).
+
\h ( Latin-1) 128255,
+ , , 160 (A0) «» 173 (AD).
+ Ansi Latin-1 128159 Unicode ;
+ html- Unicode.
+
\H , Windows- Symbol.
+ , ASCII ANSI Latin-1 (, )
+ (, ,
+ : A, B, E, H, X . .). , 230239 243254,
+ .
+
,
+ - (Microsoft Internet Explorer,
+Mozilla Firefox Opera) -.
+ Internet Explorer Firefox Windows,
+ Symbol, Opera . , Opera Firefox
+ Unicode-,
+ Windows-, Internet Explorer, .
+ \H html- ,
+ Internet Explorer ( Mozilla Firefox):
+ Windows- Symbol. Opera ( , Windows)
+ .
+
. Windows- Mozilla Firefox +« - ». + «», + : « | ...», + «» + «» « » +«...». +
+ + (∩, 8745)
+ Windows-, ,
+(, , . .), .
+ , , html- ,
+ ( \Hc7)
+ Symbol.
+
, \h \H.
+ , \h, , \H.
+ , , Opera,
+ .
+
1. , \h
+
+
\h80€ |
++ | \h82‚ |
+\h83ƒ |
+\h84„ |
+\h85… |
+\h86† |
+\h87‡ |
+\h88ˆ |
+\h89‰ |
+
\h8aŠ |
+\h8b‹ |
+\h8cŒ |
++ | \h8eŽ |
++ | + | \h91‘ |
+\h92’ |
+\h93“ |
+
\h94” |
+\h95• |
+\h96– |
+\h97— |
+\h98˜ |
+\h99™ |
+\h9aš |
+\h9b› |
+\h9cœ |
++ |
\h9ež |
+\h9fŸ |
++ | \ha1¡ |
+\ha2¢ |
+\ha3£ |
+\ha4¤ |
+\ha5¥ |
+\ha6¦ |
+\ha7§ |
+
\ha8¨ |
+\ha9© |
+\haaª |
+\hab« |
+\hac¬ |
++ | \hae® |
+\haf¯ |
+\hb0° |
+\hb1± |
+
\hb2² |
+\hb3³ |
+\hb4´ |
+\hb5µ |
+\hb6¶ |
+\hb7· |
+\hb8¸ |
+\hb9¹ |
+\hbaº |
+\hbb» |
+
\hbc¼ |
+\hbd½ |
+\hbe¾ |
+\hbf¿ |
+\hc0À |
+\hc1Á |
+\hc2Â |
+\hc3Ã |
+\hc4Ä |
+\hc5Å |
+
\hc6Æ |
+\hc7Ç |
+\hc8È |
+\hc9É |
+\hcaÊ |
+\hcbË |
+\hccÌ |
+\hcdÍ |
+\hceÎ |
+\hcfÏ |
+
\hd0Ð |
+\hd1Ñ |
+\hd2Ò |
+\hd3Ó |
+\hd4Ô |
+\hd5Õ |
+\hd6Ö |
+\hd7× |
+\hd8Ø |
+\hd9Ù |
+
\hdaÚ |
+\hdbÛ |
+\hdcÜ |
+\hddÝ |
+\hdeÞ |
+\hdfß |
+\he0à |
+\he1á |
+\he2â |
+\he3ã |
+
\he4ä |
+\he5å |
+\he6æ |
+\he7ç |
+\he8è |
+\he9é |
+\heaê |
+\hebë |
+\hecì |
+\hedí |
+
\heeî |
+\hefï |
+\hf0ð |
+\hf1ñ |
+\hf2ò |
+\hf3ó |
+\hf4ô |
+\hf5õ |
+\hf6ö |
+\hf7÷ |
+
\hf8ø |
+\hf9ù |
+\hfaú |
+\hfbû |
+\hfcü |
+\hfdý |
+\hfeþ |
+\hffÿ |
++ | + |
2. , \H
+
+
\H22" |
+\H24$ |
+\H27' |
+\H2d− |
+\H40@ |
+\H44Δ |
+\H46Φ |
+\H47Γ |
+\H4cΛ |
+\H50Θ |
+
\H51Θ |
+\H53Σ |
+\H56ς |
+\H57Ω |
+\H58Ξ |
+\H59Ψ |
+\H5c\ |
+\H5e^ |
+\H61α |
+\H62β |
+
\H63χ |
+\H64δ |
+\H65ε |
+\H66f |
+\H67γ |
+\H68η |
+\H69ι |
+\H6aφ |
+\H6bκ |
+\H6cλ |
+
\H6dμ |
+\H6eν |
+\H70π |
+\H71θ |
+\H72ρ |
+\H73σ |
+\H74τ |
+\H75υ |
+\H76v |
+\H77ω |
+
\H78ξ |
+\H79ψ |
+\H7aζ |
+\Ha1¡ |
+\Ha2′ |
+\Ha3≤ |
+\Ha5∞ |
+\Ha7♣ |
+\Ha8♦ |
+\Ha9♥ |
+
\Haa♠ |
+\Hab↔ |
+\Hac← |
+\Had↑ |
+\Hae→ |
+\Haf↓ |
+\Hb2″ |
+\Hb3≥ |
+\Hb5µ |
+\Hb6∂ |
+
\Hb9≠ |
+\Hba≡ |
+\Hbb≈ |
+\Hbd│ |
+\Hbe─ |
+\Hbf¿ |
+\Hc0א |
+\Hc1Á |
+\Hc2Â |
+\Hc3Ã |
+
\Hc4Ä |
+\Hc5Å |
+\Hc6Æ |
+\Hc7Ç |
+\Hc8È |
+\Hc9É |
+\HcaÊ |
+\HcbË |
+\HccÌ |
+\HcdÍ |
+
\HceÎ |
+\HcfÏ |
+\Hd0Ð |
+\Hd1Ñ |
+\Hd5∏ |
+\Hd6√ |
+\Hd9Ù |
+\HdaÚ |
+\HdbÛ |
+\HdcÜ |
+
\HddÝ |
+\HdeÞ |
+\Hdfß |
+\He0◊ |
+\He1‹ |
+\He5∑ |
+\Hf1› |
+\Hf2∫ |
++ | + |
PT4TaskMaker + Programming Taskbook. +
++ 4.11, , + , + Pascal, C++ C#, + Pascal PascalABC.NET. + PascalABC.NET PT4TaskMakerNET. +
++ +(dll-). Dll- + , Lib +. +, - + , + . , + PT4Demo PT4Load. + dll- + , , + PascalABC.NET; dll- + PT4\Lib PascalABC.NET . +
+ + +, , + , . +
+, PT4TaskMaker: +
+, , , +, , . + 9 , . + , , ( ), + ; + (, , ).
+ +, ( , ) + 9 ( 25). +
+ +. + Task, + (, « », + , ). + , PT4Load, + PT4Demo ( + ). +
+ +, , + , . + +( ), , + . + 9 . +
+ + + , dll-, .
+ PT4< >< >,
+ < > , _ru _en.
+, TMDemoPas PT4TMDemoPas.dll, PT4TMDemoPas_ru.dll
+ PT4TMDemoPas_en.dll.
+ , (ru ,
+en ). , ,
+ ( ).
+ :
+ ; ,
+ ; ,
+ ( ) Lib .
+
. + , + Pascal PascalABC.NET: +
+ +library PT4MakerDemo;
+
+uses PT4TaskMakerNET;
+
+// ,
+...
+
+procedure InitTask(num: integer);
+begin
+ // ,
+ // ;
+ // num; ,
+ // , case
+ ...
+end;
+
+procedure inittaskgroup;
+begin
+ // ,
+ // CreateGroup ,
+ // () .
+ //
+
+ CreateGroup('TMDemoAbc', ' ( PascalABC.NET)',
+ '. . , 2013', 'qwqfsdf13dfttd', 8, InitTask);
+ ...
+end;
+
+procedure activate(S: string);
+begin
+ // ,
+ // .
+
+ ActivateNET(S);
+end;
+
+begin
+end.
+
+
+, + , - + . +, , Visual Basic 1C + , Pascal C++ -, + .NET, Python Java. . , , «». +
+ + .
+ , html- (html-
+ ,
+ Task '< >#', , 'TMDemoAbc#',
+
PascalABC.NET.
+ ,
+ , ( ). ,
+ , ,
+
+( , ,
+ , . .).
+ ,
+html- .
+. ,
+ , «».
+
PascalABC.NET + pas- , + , , + « ». + PT4TaskMakerNET; + Lib PascalABC.NET. +
+[F9] . +
+PascalABC.NET + , + , + PT4Load + . , + , . , + TMDemoAbc : +
+uses PT4;
+begin
+ Task('TMDemoAbc1?');
+end.
+
+
+TMDemoAbc ,
+ (
+ «?», ).
+
+ Task. ,
+ «?» : Task('TMDemoAbc?').
+ , .
+
, + . +
+ +: +
+. +, , , . +, , , , + , «» + . , , +. , + , . , + , , +« », Teacher Pack. +
+. PT4Demo PT4Load + ( ). + + ( , , , «»), + - «^» (). + «^» +« , ». +
+CreateGroup, + : +
+procedure CreateGroup(GroupName, GroupDescription, GroupAuthor, + GroupKey: string; TaskCount: integer; InitTaskProc: TInitTaskProc); ++
TInitTaskProc : +
+type TInitTaskProc = procedure(n: integer); ++
CreateGroup inittaskgroup, , . +
+CreateGroup + . , , , + . : +
+PT4< > PT4< >< >);
+ pcu- ;
+const + xCenter = 0; + xLeft = 100; + xRight = 200; ++
, + : xCenter + , , +, xLeft xRight + . + + X Data Result, TaskText. +
+ + +procedure CreateTask([SubgroupName: string]); ++
+ ; SubgroupName , + ( , +; - ). + , - . + ; , + ( GroupDescription CreateGroup). + .
+4.9 CreateTask +, MPI-. +
+ + +procedure TaskText(S: string[; X, Y: integer]); ++
S, + Y ( 1 5) +, X. 1; X , + ( ) 78 . + X xCenter, xLeft xRight; , + X 0, . + ( , ); X + . + ; 1 , + 3, 2 2 4, 3 2, 3 4, +4 2 5 ( ). + , + html- . +
+ +, , + , ( + , ). + , , , Y + 0. 200.
+S +. +
+S , « + ». , S +( , ). +
+TaskText html- . + , , , +, ( + ). +
+, . +
+TaskText S 4.11 . + S , + #13, #10 #13#10. + ; - , + . ; + , ( +, 3, . .). +- , +; , ( ) + «\» ( ). + + +
procedure DataB ([Cmt: string;] B: boolean; X, Y: integer); +procedure DataN([Cmt: string;] N: integer; X, Y, W: integer); +procedure DataN2([Cmt: string;] N1, N2: integer; X, Y, W: integer); +procedure DataN3([Cmt: string;] N1, N2, N3: integer; X, Y, W: integer); +procedure DataR([Cmt: string;] R: real; X, Y, W: integer); +procedure DataR2([Cmt: string;] R1, R2: real; X, Y, W: integer); +procedure DataR3([Cmt: string;] R1, R2, R3: real; X, Y, W: integer); +procedure DataC([Cmt: string;] C: char; X, Y: integer); +procedure DataS([Cmt: string;] S: string; X, Y: integer); ++
Data +. + , - Cmt, + , X +Y ( 1; 78 ). + Y, 5, + . + TaskText, X +: 0 ( ), +100 ( ), +200 ( ). + xCenter, xLeft xRight.
+W ( + ). , + W , + . + ( SetPrecision, ). +
+ + +; + , 3 , , + , 5 , + . + L + 2 , L ( + ). +, . +
+Data, 200 ( +, , , DataN2 DataN3, ). + , + , . , + , , . + , : +( ), . +
+Cmt, , + (, ). +
+; . +
+, Cmt , 4.11 . +
+ +procedure DataComment(Cmt: string; X, Y: integer); ++
Cmt, + - . , + , 200. +X Y , + Data. +
+ +procedure ResultB ([Cmt: string;] B: boolean; X, Y: integer); +procedure ResultN([Cmt: string;] N: integer; X, Y, W: integer); +procedure ResultN2([Cmt: string;] N1, N2: integer; X, Y, W: integer); +procedure ResultN3([Cmt: string;] N1, N2, N3: integer; X, Y, W: integer); +procedure ResultR([Cmt: string;] R: real; X, Y, W: integer); +procedure ResultR2([Cmt: string;] R1, R2: real; X, Y, W: integer); +procedure ResultR3([Cmt: string;] R1, R2, R3: real; X, Y, W: integer); +procedure ResultC([Cmt: string;] C: char; X, Y: integer); +procedure ResultS([Cmt: string;] S: string; X, Y: integer); ++
+ . Cmt + . + + « ». +X, Y W , + Data. 200 .
+, , + ( W ), W , + . , + , , «» , + , + «*» () . + , ( , + ). + , + ; 12 + , , . +
+Result , , , + , . , , + + : . +
+Cmt, , + . +
+, , , + , , . , , + , , , + (, + SetPrecision). +
+; . +
+, Cmt , 4.11 . +
+ +procedure ResultComment(Cmt: string; X, Y: integer); ++
Cmt, + - . , + + , 200. +X Y , + Data. +
+ +procedure SetPrecision(N: integer); ++
N , + . + 2. 0, + , + , . , + SetPrecision, , + . + . +
+ +procedure SetRequiredDataCount(N: integer); ++
N + , + . + . N , + ; , + , + . +
+, , Series10. + N True, , + False . , , + True . + + SetRequiredDataCount, , + , + ( + « »). +
+SetRequiredDataCount + , + : . + , + . +
++ + . +SetRequiredDataCount(N) N, + , + . +
+ +procedure SetTestCount(N: integer); ++
N +, , . + 5. + N 2 9; N . +
+( ), + , , : +« . 2 ( 5)». + , + 0, ( ) . +
+ +function CurrentTest: integer; ++
4.11 . + , + . + , 1. + , 0. +
+, +CurrentTest, ( 4.10 ) + CurrentTest 0. +
++ ( , +). + ; , + ( 9) + . CurrentTest, + , . + «» + , +- ; +(, ), + . , + CurrentTest 0, + . +
+, +Array32, . +, , + + ( « », + ). + ( n , +k ): +
+n := 5 + Random(6); +case Random(4) of +0: k := 1; +1: k := n; +2, 3: k := 2 + Random(n-2); +end; + ++
, + Random(4) 0 1, + . ( ) , + 2 3; + « ». + , , + , , + . +
+case , + k + : +
+n := RandomN(5, 10); +case Random(4) of +0: k := 1; +1: k := n; +2, 3: k := RandomN(2, n-1); +end; +case CurrentTest of +2: k := n; +3: k := RandomN(2, n-1); +5: k := 1; +end; + ++
, () , + , k - . +
+, RandomN, + 4.11 . +
+CurrentTest + ( ) , + 4.11. +
+ + + +function RandomN(M, N: integer): integer; +function RandomR(A, B: real): real; ++
, + . + , + CreateGroup. + , + . +
+ RandomN(M, N) ,
+ M N1 .
+ , M.
+
RandomR(A, B) ,
+ [A, B).
+, A.
+
function Center(I, N, W, B: integer): integer; ++
, + N . + , I- + (I 1 N) , + W , + B . Center + X Data +Result ( , ). +
+, + : +
+
+n := RandomN(2, 10);
+DataN('N = ', n, 0, 2, 1);
+for i := 1 to n do
+begin
+ a[i] := RandomR(-9.99, 9.99);
+ DataR(a[i], Center(i, n, 5, 1), 4, 5);
+end;
+
+( ) N , + 2 10 +( «N = »). ( ) +, Center + . -9 9, . . + , , + -; , + , 5 ; + : Center DataR. + +1 ( , Center). +
++ Center ( 4.11 , + ). +
+ +4.9 , + Data Result, DataComment ResultComment, + Y , 5. + Y + 5, + , + . + , + Y, + 5. , + . + ; + , . + . +
+, +«» ( + ). + - Y, + 5, , , + « + ». , + , + , , + « + ». +
+, , + . + , , + + . +, 1300 , Programming Taskbook, + . + + Align, Programming Taskbook for Bio. +
+, 4.11 , + , + . +
+ +procedure UseTask(GroupName: string; TaskNumber: integer); ++
+ TaskNumber GroupName. + . , + « +», , , html- , + . +
+- , + . +
+ GroupName
+ (
+ #). , Demo Demo10
+ Proc46, Demo11 Proc49, Proc46,
+ Proc49 , 2. ,
+ Demo11 Demo10, Demo8 (
+« » Demo11, Proc46 Proc49).
+ 2 : UseTask('Proc#2',49).
+
, «». + , , . . +( + CreateTask). +
+, html- . + () + . , . +
++ , , + . , + , html- . +
++ + .
+ +procedure CommentText(S: string); ++ + +
procedure UseComment(GroupName: string[; SubgroupName: string]); ++
UseComment SubgroupName + GroupName , SubgroupName , + GroupName. + . GroupName SubgroupName + .
+GroupName SubgroupName, ; + . +
+CommentText UseComment CreateGroup; + . + - , + Subgroup, .
+ + + +procedure Subgroup(SubgroupName: string); ++
SubgroupName +. +( , dll-, inittaskgroup). +
+ Subgroup , + . Subgroup + (, + CreateGroup).
+ +const + lgPascal = $0001; + lgVB = $0002; + lgCPP = $0004; + lg1C = $0040; + lgPython = $0080; + lgCS = $0100; + lgVBNET = $0200; + lgPascalNET = $0400; + lgJava = $10000; + lgWithPointers = $003D; + lgWithObjects = $FFF80; + lgNET = $FF00; + lgPascalABCNET = $0401; + lgAll = $FFFFFF; ++
, CurrentLanguage, + , + (. . ) . + lgPascal, lgVB, lgCPP, lgCS, +lgVBNET, lgPascalABCNET, lg1C, lgPython, lgJava , + (Pascal, Visual Basic, C++, C#, Visual Basic .NET, +PascalABC.NET, 1:, Python, Java). + . + lg1C 4.9 ( + PT for 1C + 1:), lgPython 4.10 ( + Python), lgJava 4.11 ( + Java). +
++(. . ) , + : +
+, PascalABC.NET, + Pascal .NET. + lgPascal lgPascalNET; , , , +lgWithPointers, lgWithObjects lgNET. PascalABC.NET lgPascalABCNET. +
+ +function CurrentLanguage: integer; ++ +
, , . + + , , + , ; + . , , + .NET, : +
+CurrentLanguage and lgNET <> 0 ++
PascalABC.NET CurrentLanguage
+lgPascalABCNET.
+
function CurrentLocale: string; ++ +
, , . . ,
+ . 4.11 CurrentLocale 'ru'
+( ) 'en' ( ).
+
function CurrentVersion: string; ++ +
4.10 .
+ 'd.dd'.
+, 4.11 '4.11'. , 4.10,
+ '4.00'.
+
PT4TaskMaker + : (Word), + (Sentence) (Text). +
+ +const + SampleError = '#ERROR?'; + MaxLineCount = 50; + +function WordCount: integer; +function SentenceCount: integer; +function TextCount: integer; +function WordSample(N: integer): string; +function SentenceSample(N: integer): string; +function TextSample(N: integer): string; + +function EnWordCount: integer; +function EnSentenceCount: integer; +function EnTextCount: integer; +function EnWordSample(N: integer): string; +function EnSentenceSample(N: integer): string; +function EnTextSample(N: integer): string; ++
WordSample, SentenceSample TextSample + , , . . , +(. CurrentLocale): + , . , + En, . +
+, Count, + . 4.11, , , + 116 , 61 85 , . +
+WordSample/EnWordSample SentenceSample/EnSentenceSample + N ( 0).
+TextSample/EnTextSample , , + N ( 0). + #13#10 ( ). , + MaxLineCount. ; + , (« ») . + . +
+N , , SampleError. +
+«» . +
+- () . + « » , +( ): +
+- 76 ; , +(, ). +
+ + + + + + + diff --git a/PABCNetHelp/ForEducation/MakeModules/tmaker_proc2.html b/PABCNetHelp/ForEducation/MakeModules/tmaker_proc2.html new file mode 100644 index 000000000..0d5efd126 --- /dev/null +++ b/PABCNetHelp/ForEducation/MakeModules/tmaker_proc2.html @@ -0,0 +1,709 @@ + + + + + +, + . +
+ +PT4TaskMaker ( + ) 10 . + + , (, , , ). + 999 ( ); + , 999 , , 999, . + + , +, + text 70 .
+, , + CreateTask.
+, . + , + , .tst. +
+, , , + . + , . +
+procedure DataFileN(FileName: string; Y, W: integer); +procedure DataFileR(FileName: string; Y, W: integer); +procedure DataFileC(FileName: string; Y, W: integer); +procedure DataFileS(FileName: string; Y, W: integer); +procedure DataFileT(FileName: string; Y1, Y2: integer); ++
DataFile , N, R, C, S, + , , +. DataFileT . + , +, , . + FileName.
+, + , DataFileT, + . , , +Y , + , W + , . + W, + ( + ); + W, , +, «*» () . + + W , + , + , + . , + , SetPrecision; + + . , +, , + . + .
+DataFileT Y1 + Y2 + , + . + .
+Y, Y1, Y2 + 1 5 (Y Y1 + 0; ); Y1 + Y2. W + 172.
++DataFile , + . + . DataFile + , +Data, «», .
+DataFile + . + . + ; + ( ) + .
++ , + , «» , + . +, + , +DataFile. , + , . + , , + .
+( ., , File4) + . + DataFile Y Y1 + 0. , + , DataFile + .
+, + . , + Pascal; + , . + PascalABC.NET + file of ShortString. +
+ + +procedure ResultFileN(FileName: string; Y, W: integer); +procedure ResultFileR(FileName: string; Y, W: integer); +procedure ResultFileC(FileName: string; Y, W: integer); +procedure ResultFileS(FileName: string; Y, W: integer); +procedure ResultFileT(FileName: string; Y1, Y2: integer); ++
ResultFile , N, R, C, +S, + + , , +. ResultFileT + . + , +, , . + , , , + .
+ResultFile + DataFile, +, Y, Y1, Y2 + . + ResultFile , +DataFile.
+ResultFile + + , +. , , + . +, ResultFile, + ( + ). , + . , + ResultFile, + , +. , , + . +; , +.
+DataFile, + , +ResultFile Y +Y1 0 (., , File1). , , + + .
++, (. + DataFile). +
+ ++ :
+type + PNode = ^TNode; + TNode = record + Data : integer; + Next : PNode; + Prev : PNode; + Left: PNode; + Right: PNode; + Parent: PNode; + end; ++
-
+( Next Prev), ( Left Right),
+ ( Left, Right Parent).
+ , , (, ,
+ ),
+ , «ptr»,
+, , P1 = ptr, PX = ptr . .
+ 36 ,
+0 35. 0 9
+(P0P9), 10 35
+(PAPZ).
+ , «ptr»
+ «nil» ( ,
+ ), , P1 = nil Pascal,
+P1 = NULL C++.
+ , ,
+ .
+
procedure SetPointer(NP: integer; P: PNode); ++
+NP ( P, + ). , + , , +NP.
+NP 0 35; + (. ). SetPointer + NP , .
+ +procedure DataP([Cmt: string;] NP: integer; X, Y: integer); +procedure ResultP([Cmt: string;] NP: integer; X, Y: integer); ++
DataP ResultP NP ,
+,
+.
+ P# =, # ,
+ ( NP 0 9 , NP 10 35
+ A Z). ;
+ : ptr
+ nil .
+ , Cmt,
+ (,
+ Cmt = ' : ' NP = 6
+ : : P6 = ptr).
+ Cmt .
+ DataP ResultP ,
+ . Y
+ ( 1 5), X ( 1 78;
+ , ,
+ ).
, Cmt , 4.11 . +
+ + +procedure DataList(NP: integer; X, Y: integer); +procedure ResultList(NP: integer; X, Y: integer); ++
DataList ResultList «- +» , , , + . NP ( + SetPointer), + , . . . + , . .
++ + ; , + ( ShowPointer), + (, Data ) + .
+ ,
+ Data (, .23.).
+ , ,
+ , , , .
+, , , ,
+ (, (23)), Next,
+ ( 46 - **). ,
+ .
+ (. 3).
+ « » 14 TNode, + Data 9 99, Data + . 1099, + (, +. Dynamic70). + , + . +
+
+ , Next Prev;
+ : «=».
+ , Next, Prev
+ ,
+ (, - TNode).
+ : «-».
+
DataList ResultList + , + . ShowPointer, +SetNewNode SetDisposedNode + . +
+ +procedure DataBinTree(NP, X, Y1, Y2: integer); +procedure ResultBinTree(NP, X, Y1, Y2: integer); +procedure DataTree(NP, X, Y1, Y2: integer); +procedure ResultTree(NP, X, Y1, Y2: integer); ++
+( ) (DataBinTree DataTree) + (ResultBinTree ResultTree) . + « » («left child right sibling»). + DataList ResultList, , + PNode, SetPointer. + ; + , . + , , ( ) ; + Y1 Y2 . + «» ( ), + : X , + . , + , ; , X, . +
++ , + . ShowPointer, +SetNewNode SetDisposedNode + . +
+ , , .
+ , Data,
+( , , 234, :
+2*).
+ («-» «=»);
+ , , ,
+ ( . 6).
+ Parent; .
+
. + ; , DataBinTree ResultBinTree. + ( . + 5 6). + ( ); + , DataTree + ResultTree. , Left P, , P + () , , Right, + -«» P , P. + , , + (. 7). +
+, , : +
+.23. (
+ SetNewNode);
+(23);
+, , . Left Right + , . +
+18; , 4 , + , 4 ( ). , , + 78, 18 . +, 16 , 11 ; + , , , . +
+, , 18. + , 0. , + ; . +
+, , + , +(, , , , ). + , . + « », , , +, , « », + , , , +(. 8). + , . +
+, , 0 ( ). + , , , + Parent nil. + , . +
+, ; + , -, , + , Left Right , + . , :
+
, , 18. +
+ ++ . , + Pascal; + nil + (. SetObjectStyle), .
+ +P1 +24 - 23 >nil ++
+ P1; + : «» + , , Next ( 24) ( 23). + Next nil. +
+ +P1 P2 +nil< 14 = 23 = 34 >nil ++
+ ( , Next Prev, + «=»), : +P1 , P2 . +
+ +P0 +<< = 15 - 23 = 34 = >> ++
+ ( +«<<» «>>»), . + , 23 ( P0) 15, +. . Prev 23 (, nil). + , + . +, ( 15 23) , . . Next 15 23. +
+ +PXPY +95 - 63 -.34.- >> ++
+ . . +-, 95 (PX PY), +, -, 34 New +( ). , , . + SetNewNode. +
+ + +
4. ( Data 96) + P1. +
+ +
( ). +
+ +
( ). + 13 : 71, 73 29. , + Left () , Right () -. +
+ +
. + . , , + . +
+ + +procedure ShowPointer(NP: integer); ++
NP + . , ShowPointer(1) +P1 1, 2 5. NP + , + ShowPointer . + NP +, .
+
+( , ).
+ ShowPointer
+ ; ,
+, (, P3P6).
+ ,
+ . ,
+ .
+ , ShowPointer ,
+ (,
+ ),
+ (, P1P2P3*).
+ , P*.
+ * .
+ , (. 8), + ShowPointer , + SetNewNode ( + ShowPointer « P1»). +
+[Pascal] +
+procedure SetNewNode(NNode: integer); ++
[C++]
+void SetNewNode(int NNode); ++
NNode ( 1) + , New ( + . 4). + (. 8); + , + ( , 1; + . Tree13). +
++ ( + Result: ResultList, ResultBinTree, ResultTree). + NNode, + .
+, NNode + , + ShowPointer SetNewNode.
+( New Pascal ) + , + , () +, « ».
+ +procedure SetDisposedNode(NNode: integer); ++
NNode ( + 1, ), + . + ( + Data: DataList, DataBinTree, DataTree). + NNode, + .
+, SetDisposedNode, . + + , + .
+ + +procedure SetObjectStyle; ++
« » + PascalABC.NET. + , TNode PNode, + Node ( + .NET , , PascalABC.NET). +
+Node . + , TNode, PNode . + .NET, Python Java, + Node. , 4.11 , +, , : + PascalABC.NET. + SetObjectStyle ( , Node, + ). +
+PascalABC.NET, + , + («» «», «» + «» . .), , + , « », SetObjectStyle +( « », + ). SetObjectStyle CreateTask +( , + , + ). , : +
+A1 = Node (
+ , P1, P2
+ . . A1, A2 . .).
+( P A) , + . , + , 1, : +
+A1 +24 - 23 >nil ++
nil , PascalABC.NET , +«» . .NET «» + ; , C# null, VB.NET + Noth ( Nothing). +
+, ObjDyn ObjTree, PascalABC.NET. + Dynamic Tree, . +
+ +, , + , 4.9 Programming Taskbook. + + Programming Taskbook for MPI. +
+ +procedure CreateTask([SubgroupName: string;] var ProcessCount: integer); ++
CreateTask + +. CreateTask + ProcessCount. SubgroupName + , : + , , + . + SubgroupName , + - . +
+ProcessCount . + 2 36 . ProcessCount + ; + . +
+ProcessCount 1, + CreateTask ( + ProcessCount 1, , «» +). +
+ProcessCount 36, + . +
+ProcessCount + , «» , + CreateTask ProcessCount (. ). +
+ +| «» + | +ProcessCount + | ProcessCount + | +
| -, + | +( ) + | +0 + | +
| ( 0) + | ++ | +; + | +
| + | ++ | +0 + | +
| , + | ++ | +; + | +
procedure SetProcess(ProcessRank: integer); ++
+ ProcessRank. + +. + 0. + (, + , + ). +
+ProcessRank 0 + N 1, N , + ProcessCount CreateTask. + +« SetProcess +0..N1, N +». +
+ + + + + diff --git a/PABCNetHelp/ForEducation/MakeModules/tmaker_samples.html b/PABCNetHelp/ForEducation/MakeModules/tmaker_samples.html new file mode 100644 index 000000000..ede0c58da --- /dev/null +++ b/PABCNetHelp/ForEducation/MakeModules/tmaker_samples.html @@ -0,0 +1,807 @@ + + + + + ++ MakerDemo, Begin. +dll- , PT4MakerDemo. +
+ + +PT4MakerDemo.pas, , : +
+ +library PT4MakerDemo;
+
+uses PT4TaskMakerNET;
+
+procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('Begin', num);
+ end;
+end;
+
+procedure inittaskgroup;
+begin
+ CreateGroup('MakerDemo', ' ',
+ '. . , 2013', 'qwqfsdf13dfttd', 2, InitTask);
+end;
+
+procedure activate(S: string);
+begin
+ ActivateNET(S);
+end;
+
+begin
+end.
+
+
+PT4TaskMakerNET, +InitTask, . + , + UseTask, . + 1 2 Begin. +
+ . inittaskgroup
+( , . . ).
+ CreateGroup, :
+ ('MakerDemo'), (' '), ,
+ , (2) (InitTask).
+
inittaskgroup activate +( ), + ActivateNET, PT4TaskMakerNET. +
+ + +, + PT4TaskMakerNET. PascalABC.NET + LIB PascalABC.NET, + . + , + (dll-) ( + « ». +
++ , . + PT4MakerDemo.dll, + - PT4Load. + ( [Shift]+[Ctrl]+[L]) + , , , + MakerDemo. + MakerDemo , , + PT4MakerDemo.dll. ( , + PT4) inittaskgroup activate, + . +
+, «» «MakerDemo1» + [Enter] ( «»); MakerDemo1.pas, + PascalABC.NET. : +
+
+uses PT4;
+
+begin
+ Task('MakerDemo1');
+
+end.
+
+-, + + «?»: +
+ Task('MakerDemo1?');
+
++ : +
+
+
, + 4.11 , . + , + ( , ), + . +[F4]. : +
+
+
+( [Enter] [Backspace], + (. . «») . + , PascalABC.NET. +, +, . +
++
+. ,
+ ,
+ . Task,
+ , «?» :
+Task('MakerDemo?').
+
+ .
+
, MakerDemo1 (. ), + , Begin + « , ». + MakerDemo () , +. , + . inittaskgroup + ( CreateGroup): +
+ +CommentText(' ');
+CommentText('\I \i \MPT4TaskMaker\m.');
+
+Subgroup(' , ');
+CommentText(' , ');
+CommentText(' Begin.\P ');
+CommentText(' .\P');
+UseComment('Begin');
+
+ CommentText
+ MakerDemo.
+ : \I
+ \i ,
+ \M \m , .
+ Subgroup .
+ , , , CommentText,
+ \P, .
+
, (UseComment) +Begin « , ». +UseComment, ; : + , . , + ( , ). Begin , + . +
+ , html- MakerDemo.
+ , ,
+ «?» Task «#»: Task('MakerDemo?').
+ html- :
+
+
+
+
(« + »), Begin. +
+ + +. Task «#»,
+ (, Task('MakerDemo2#')), html-
+ . ,
+ . html- ( )
+ Task , «#».
+
. Begin3, + . + , MakerDemo3 +( , , ): +
+procedure MakerDemo3;
+var
+ a, b: real;
+begin
+ CreateTask(' , ');
+ TaskText(' ~{a} ~{b}.', 0, 2);
+ TaskText(' {S}~=~{a}\*{b} {P}~=~2\*({a}\;+\;{b}).',
+ 0, 4);
+ a := RandomN(1, 99) / 10;
+ b := RandomN(1, 99) / 10;
+ DataR('a = ', a, xLeft, 3, 4);
+ DataR('b = ', b, xRight, 3, 4);
+ ResultR('S = ', a * b, 0, 2, 4);
+ ResultR('P = ', 2 * (a + b), 0, 4, 4);
+ SetTestCount(3);
+end;
+
+MakerDemo3 ( , ) + InitTask. +
+MakerDemo3 , : +
+MakerDemo, 3: +
+procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('Begin', num);
+ 3: MakerDemo3;
+ end;
+end;
+
+, CreateGroup, 3. +
+ , html- MakerDemo ,
+ «#» «?» (
+ Task Task('MakerDemo?'))
+ ,
+ MakerDemo3. ,
+ ; ,
+ .
+
MakerDemo : Matrix7 +( « (): »), + String, +: « : ». + MakerDemo4 MakerDemo5: +
+procedure MakerDemo4;
+var
+ m, n, i, j, k: integer;
+ a: array [1..5, 1..8] of real;
+begin
+ CreateTask(' (): ');
+ TaskText(' ~{M}\;\x\;{N} ~{K} (1~\l~{K}~\l~{M}).',
+ 0, 2);
+ TaskText(' {K}- .', 0, 4);
+ m := RandomN(2, 5);
+ n := RandomN(4, 8);
+ k := 1;
+ if m = 5 then k := 0;
+ DataN('M = ', m, 3, 1, 1);
+ DataN('N = ', n, 10, 1, 1);
+ for i := 1 to m do
+ for j := 1 to n do
+ begin
+ a[i, j] := RandomR(-9.99, 9.99);
+ DataR(a[i,j], Center(j, n, 5, 1), i + k, 5);
+ end;
+ k := RandomN(1, m);
+ DataN('K = ', k, 68, 5, 1);
+ for j := 1 to n do
+ ResultR(a[k, j], Center(j, n, 5, 1), 3, 5);
+ SetTestCount(5);
+end;
+
+procedure MakerDemo5;
+var
+ s: string;
+begin
+ CreateTask(' : ');
+ TaskText(' ~{S}.', 0, 2);
+ TaskText(' .', 0, 4);
+ s := WordSample(RandomN(0, WordCount-1));
+ if CurrentTest = 3 then
+ while s[1] = s[Length(s)] do
+ s := WordSample(RandomN(0, WordCount-1));
+ DataS('S = ', s, 0, 3);
+ ResultC(' : ', s[1], xLeft, 3);
+ ResultC(' : ', s[Length(s)], xRight, 3);
+ SetTestCount(4);
+end;
+
+Center + + : 5 , + . MakerDemo4 SetTestCount; + , , 5. +
++ , DataR ResultR, + ( Data Result 4.11 ). +
+MakerDemo5 + WordCount WordSample. + . , PT4TaskMaker +EnWordCount EnWordSample, . +
+MakerDemo5 , 4.11 : + CurrentTest, + . + - , , + . + S -, + , . + , + , . +, , + while. CurrentTest + : , , + 3, . + CurrentTest. +
+CreateGroup 5 + InitTask: +
+procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('Begin', num);
+ 3: MakerDemo3;
+ 4: MakerDemo4;
+ 5: MakerDemo5;
+ end;
+end;
+
+
+: +
+
+
+
MakerDemo : File63 +( « »), + Text16 ( « : »). + MakerDemo6 MakerDemo7: +
+ +function FileName(Len: integer): string;
+const
+ c = '0123456789abcdefghijklmnopqrstuvwxyz';
+var
+ i: integer;
+begin
+ result := '';
+ for i := 1 to Len do
+ result := result + c[RandomN(1, Length(c))];
+end;
+
+procedure MakerDemo6;
+var
+ k, i, j, jmax: integer;
+ s1, s2, s3: string;
+ fs1: file of ShortString;
+ fs2: file of ShortString;
+ fc3: file of char;
+ s: ShortString;
+ c: char;
+begin
+ CreateTask(' ');
+ TaskText(
+ ' ~{K} (>\,0) .'#13 +
+ ' : , {K}~'#13 +
+ ' , , {K}- '#13 +
+ ' ( ~{K}, '#13 +
+ ' , ).'
+ );
+ s1 := '1' + FileName(5) + '.tst';
+ s2 := '2' + FileName(5) + '.tst';
+ s3 := '3' + FileName(5) + '.tst';
+ Assign(fs1, s1);
+ Rewrite(fs1);
+ Assign(fs2, s2);
+ Rewrite(fs2);
+ Assign(fc3, s3);
+ Rewrite(fc3);
+ k := RandomN(2, 11);
+ jmax := 0;
+ for i := 1 to RandomN(10, 20) do
+ begin
+ j := RandomN(2, 16);
+ if jmax < j then
+ jmax := j;
+ s := FileName(j);
+ write(fs1, s);
+ if j >= k then
+ c := s[k]
+ else
+ c := ' ';
+ write(fc3, c);
+ s := copy(s, 1, k);
+ write(fs2,s);
+ end;
+ Close(fs1);
+ Close(fs2);
+ Close(fc3);
+ DataN('K = ', k, 0, 1, 1);
+ DataS(' : ', s1, 3, 2);
+ DataS(' : ', s2, 3, 4);
+ DataS(' : ', s3, 3, 5);
+ DataComment(' :', xRight, 2);
+ DataFileS(s1, 3, jmax + 3);
+ ResultComment(' :',
+ 0, 2);
+ ResultComment(' :',
+ 0, 4);
+ ResultFileS(s2, 3, k + 3);
+ ResultFileC(s3, 5, 4);
+end;
+
+procedure MakerDemo7;
+var
+ p: integer;
+ s, s1, s2, s0: string;
+ t1, t2: text;
+begin
+ CreateTask(' : ');
+ TaskText(' .', 0, 2);
+ TaskText(' .', 0, 4);
+ s1 := FileName(6) + '.tst';
+ s2 := '#' + FileName(6) + '.tst';
+ s := TextSample(RandomN(0, TextCount-1));
+ Assign(t2, s2);
+ Rewrite(t2);
+ Assign(t1, s1);
+ Rewrite(t1);
+ writeln(t2, s);
+ Close(t2);
+ s0 := #13#10#13#10;
+ p := Pos(s0, s);
+ while p <> 0 do
+ begin
+ Delete(s, p, 2);
+ p := Pos(s0, s);
+ end;
+ writeln(t1, s);
+ Close(t1);
+ ResultFileT(s1, 1, 5);
+ Rename(t2, s1);
+ DataFileT(s1, 2, 5);
+ DataS(' : ', s1, 0, 1);
+ SetTestCount(3);
+end;
+
+FileName(Len), + Len ( ). + () . +
+, FileName, .tst (, + File, Text Param ). +
+FileName MakerDemo6. +
+ , MakerDemo6
+ : 1 , 2 , 3 .
+ MakerDemo7
+ #, .
+
MakerDemo6 TaskText, + 4.11 . + TaskText , + , , , + #13, #10 #13#10 ( ). + TaskText + . +
++ TextCount TextSample. , TextSample, + , #13#10. + ( ). + +writeln, , , . +
+CreateGroup 7 + InitTask: +
+procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('Begin', num);
+ 3: MakerDemo3;
+ 4: MakerDemo4;
+ 5: MakerDemo5;
+ 6: MakerDemo6;
+ 7: MakerDemo7;
+ end;
+end;
+
+
+: +
+
+
+
, , + , +: , TNode + PNode, «», .NET- +(C#, Visual Basic .NET, PascalABC.NET), Python Java. + , , + TNode PNode . + , + Node ( ). +
+, , Dynamic30, + ( « : »). + MakerDemo8 MakerDemo8Obj: +
+ +var WrongNode: TNode;
+
+procedure MakerDemo8Data;
+var
+ i, n: integer;
+ p, p1, p2: PNode;
+begin
+ if RandomN(1, 4) = 1 then
+ n := 1
+ else
+ n := RandomN(2, 9);
+ case CurrentTest of
+ 2: n := 1;
+ 4: n := RandomN(2, 9);
+ end;
+ new(p1);
+ p1^.Data := RandomN(10, 99);
+ p1^.Prev := nil;
+ p2 := p1;
+ for i := 2 to n do
+ begin
+ new(p);
+ p^.Data := RandomN(10, 99);
+ p^.Prev := p2;
+ p2^.Next := p;
+ p2 := p;
+ end;
+ p2^.Next := nil;
+ SetPointer(1, p1);
+ SetPointer(2, p2);
+ ResultP(' : ', 2, 0, 2);
+ ResultList(1, 0, 3);
+ ShowPointer(2);
+ DataP(1, 0, 2);
+ p := p1;
+ for i := 1 to n do
+ begin
+ p^.Prev := @WrongNode;
+ p := p^.Next;
+ end;
+ DataList(1, 0, 3);
+ ShowPointer(1);
+end;
+
+procedure MakerDemo8;
+begin
+ CreateTask(' : ');
+ TaskText(' ~{P}_1 ' +
+ '- TNode,', 0, 1);
+ TaskText(' Next. ' +
+ ' Prev TNode,', 0, 2);
+ TaskText(' (\I\i) ' +
+ ' \I\i, ', 0, 3);
+ TaskText(' ' +
+ '( Next),', 0, 4);
+ TaskText(' ( Prev). Prev ' +
+ ' ', 0, 5);
+ TaskText(' \N. ' +
+ ' .', 0, 0);
+ MakerDemo8Data;
+end;
+
+procedure MakerDemo8Obj;
+begin
+ CreateTask(' : ');
+ TaskText(
+ ' ~{A}_1 - Node,'#13 +
+ ' Next. Prev'#13 +
+ ' , (\I\i) \I\i,'#13 +
+ ' ( '#13 +
+ ' Next), ( Prev). Prev'#13 +
+ ' \O. ~{A}_2 '#13 +
+ ' .'
+ );
+ SetObjectStyle;
+ MakerDemo8Data;
+end;
+
+
+, , . + + , MakerDemo8Data. + + (. , ). + , . +
++ PascalABC.NET , + : ( Delphi Free Pascal Lazarus) + ( C#, Visual Basic .NET, Python Java). + PascalABC.NET +, , ( , + ), +SetObjectStyle. . +
+5 . , + , TaskText, + 0 (. MakerDemo8). + «» + TaskText , (. MakerDemo9). + ( ) + , ; + , , . +
+ ( ) ,
+ \N ( ) \O ( ).
+ PascalABC.NET nil.
+
, , + ( ) , , . + . + , + , . + , CurrentTest, + 4.11 , + 2, 4. , , + 5 «», + «» . +
+ Prev
+ «» ( WrongNode),
+ . , , , Prev
+ nil,
+ : Prev nil,
+«» ( ) nil<.
+
: + ( ), + , , , + , . +
+ +, , + . : +
+, PascalABC.NET, + , . , , +PascalABC.NET . +
+, + , , + . +
+InitTask : +
+ + +procedure InitTask(num: integer);
+begin
+ case num of
+ 1..2: UseTask('Begin', num);
+ 3: MakerDemo3;
+ 4: MakerDemo4;
+ 5: MakerDemo5;
+ 6: MakerDemo6;
+ 7: MakerDemo7;
+ 8: if CurrentLanguage and lgWithPointers <> 0 then
+ MakerDemo8
+ else
+ MakerDemo8Obj;
+ 9: MakerDemo8Obj;
+ end;
+end;
+
+
+CurrentLanguage, + , + . , + ( PascalABC.NET), + 8 MakerDemo8, . + , . + PascalABC.NET 9; + 9 «» 8. +
+ +CurrentLanguage inittaskgroup , + . + , CreateGroup begin +( , + CreateGroup n): +
+var
+ n: integer;
+begin
+ n := 7;
+ if CurrentLanguage = lgPascalABCNET then
+ n := 9
+ else
+ if CurrentLanguage and (lgWithPointers or lgWithObjects) <> 0 then
+ n := 8;
+ CreateGroup('MakerDemo', ' ',
+ '. . , 2013', 'qwqfsdf13dfttd', n, InitTask);
+
+, + , , . , + ( lgPascalABCNET), + lgWithPointers lgWithObjects. , + , , + , + . +
+ +PascalABC.NET . + ( + , , , ). + + , . +
+
+
+
PT4MakerDemo, ( + inittaskgroup): +
+ + Subgroup(' (): ');
+ CommentText(' Matrix7.');
+
+ Subgroup(' ');
+ CommentText(' File63.');
+ CommentText(' , ');
+ CommentText('\I\i .');
+
+ Subgroup(' : ');
+ CommentText(' Text16.');
+
+ Subgroup(' : ');
+ CommentText(' Dynamic30.');
+ CommentText('\P : ');
+ CommentText('( Pascal C++) ( .NET,');
+ CommentText(' Python Java). Visual Basic .');
+ CommentText(' PascalABC.NET .');
+
+
+html- : +
+ +
+
Programming Taskbook + Pascal, Visual Basic, C++, C#, Visual Basic .NET, Python Java. + 1300 , + : + . 4.10, + , . +
+ +Programming Taskbook + , + +(mabr@math.sfedu.ru).
+ + +4.11 Programming Taskbook : +
++ Pascal ABC (http://sunschool.mmcs.sfedu.ru, + . . . ), «Pascal ABC & +Programming Taskbook». + + PascalABC.NET + - ProgrammingABC.NET WDE (http://www.pascalabc.net/WDE). +
+ +4.9, + Programming Taskbook for MPI + + MPI. +
+ +4.10, + +Programming Taskbook for Bioinformatics + . +
+ +4.11 Python Java + ( , + ). +
+ +Programming Taskbook +: +
+ , + -, , , + . +, + , + . +
+« Programming Taskbook 4» + 28 2007 . ( + 2007611815). +
+, , , + , +ptaskbook.com. +
+ + + +: +
PascalABC.NET + PascalABC.NET + «», :
+4.11, PT4Results + , F2. +
+ + + + +- , + PT4Setup). +, -, «°». + - 310 , Begin, Integer, +Boolean, 200 . + , - :
+ ++Begin1Begin40, Integer1Integer30, Boolean1Boolean40, If4, If6, If8, If12, If22, If26, +Case2, Case4, Case9Case10, Case18, For5, For12For13, For15For16, For19For20, For33, For36, +While1While2, While4, While7, While11While12, While22While23, Series1, Series15Series17, +Series19, Series21, Series30, Proc4, Proc8, Proc10, Proc20Proc21, Proc25, Proc40, Minmax1, +Minmax6, Minmax12, Minmax19, Minmax22, Array4, Array7, Array16, Array32, Array47, Array54, +Array63, Array71, Array79, Array89, Array92, Array108, Array112, Array116, Array134, Matrix7, +Matrix24, Matrix36, Matrix53, Matrix74, Matrix82, Matrix88, Matrix100, String9String10, String19, +String29, String41, String44, String63, String70, File2, File10, File25, File27, File41, File43, +File48, File50, File58, File61, File63, File67, File74, Text1, Text4, Text16, Text21, Text24, +Text34, Text38, Text42, Text44, Text57, Param1, Param17, Param30, Param40, Param49, Param53, +Param59Param61, Recur1, Recur4Recur5, Recur10, Recur14Recur18, Recur21, Recur25, Recur27, +Dynamic2Dynamic3, Dynamic5, Dynamic8Dynamic12, Dynamic25, Dynamic30, Dynamic49, Dynamic55, +Dynamic59, Dynamic63, Dynamic70, Dynamic74, Dynamic78, +Tree2, Tree6, Tree9, Tree12Tree13, Tree32, Tree34, Tree40, Tree47, Tree49, Tree53, +Tree59, Tree65, Tree70, Tree74Tree76, Tree79, Tree86, Tree92, +ExamBegin2, ExamBegin5, ExamBegin7, ExamBegin12, ExamBegin21, ExamBegin28, ExamBegin33, ExamBegin38, ExamBegin42, +ExamBegin45, ExamBegin49, ExamBegin51, ExamBegin53, ExamBegin61, ExamBegin65, ExamBegin71, +ExamBegin83ExamBegin84, ExamBegin87, ExamBegin95, +ExamTaskC1, ExamTaskC4, ExamTaskC13, ExamTaskC19, ExamTaskC25, ExamTaskC34, ExamTaskC37, ExamTaskC44, ExamTaskC49, +ExamTaskC53, ExamTaskC62, ExamTaskC68, ExamTaskC73, ExamTaskC81, ExamTaskC83, ExamTaskC86, ExamTaskC88, +ExamTaskC92, ExamTaskC97, ExamTaskC100. +
+ +- +, . + , , , + + . +
+ + + + + + + + + + diff --git a/PABCNetHelp/ForEducation/PT4/Demo.html b/PABCNetHelp/ForEducation/PT4/Demo.html new file mode 100644 index 000000000..95869cb7a --- /dev/null +++ b/PABCNetHelp/ForEducation/PT4/Demo.html @@ -0,0 +1,123 @@ + + + + +
+
+ Task
+ ?, :
+Task('Begin12?');
+
+
+ ? , , 'Begin?'.
+ .
+
: +
+ +. +
+++ ++
++ + + ++
+ , + .
+ - , ,
+PT4Demo, PascalABC.NET
+ « | » (
+
+ Shift+Ctrl+D).
+
PT4Demo. + ( +Ctrl+[<] Ctrl+[>]) ( + Ctrl+Shift+[<] Ctrl+Shift+[>]). +
+++ ++
, +( , -). + , + results.abc.
+ + + 4.8 html-.
+ ( html-, )
+ Task, ,
+ «#», , Begin# Begin3#.
+ , .
+ Task , #,
+ , ; html-
+ , Task ( ).
+
- , , + html- . +
+ +html- , PT4Tasks.css, + , PT4 + PascalABC.NET. , html- . +
+ +html- PT4Tasks.html . + , . +
+ + + html- PT4Demo.
+
(. ) F2.
+
, Programming Taskbook + 4.11 ( ). + +
Begin , (40),
+Integer (30),
+For (40),
+Boolean (40),
+If (30),
+Case (20),
+While (30),
+Series (40),
+Proc (60),
+Minmax (30),
+Array (140),
+Matrix () (100),
+String (70),
+File () (90),
+Text (60),
+Param (70),
+Recur (30),
+Dynamic (80),
+Tree (100),
+ExamBegin : (100),
+ExamTaskC : (100).
+PascalABC.NET ObjDyn ObjTree, + Dynamic Tree, + ( Dynamic Tree ). +
+ Programming Taskbook
+ PT4.
+
PT4TaskMaker, , + . +
+ + +, + . +Dynamic Tree ( ObjDyn ObjTree), + , .
+, + ( , + ). + ; , + . , + , .
+( , ) + 1. , + 10 10 ´ 10 .
++ , A N + 1 A1, + N AN. , + B B1,1. , + (): + M × N 1, + M, N. + + .
+, + , , + . , + , + .
++ ( , + ). , , + , 1.
+ + + +4.10, Programming Taskbook , + . Exam; +Pascal ( PascalABC.NET) C++. +
+Exam: ExamBegin, + , , + ExamTaskC, +, . 100 ; +20 - . +
+Exam , + -, . , + , , , , + - +: Read/Readln-Write/Writeln Pascal +- cin-cout C++. +
+Exam : + . + , + ( ExamTaskC), , , + . +
+Exam +( , + ). +
+- , - + . + , + , «» +. +
+ + + + + + + + + + diff --git a/PABCNetHelp/ForEducation/PT4/IO.html b/PABCNetHelp/ForEducation/PT4/IO.html new file mode 100644 index 000000000..eae078fea --- /dev/null +++ b/PABCNetHelp/ForEducation/PT4/IO.html @@ -0,0 +1,471 @@ + + + + + +
+ , uses
+ PT4 (. ,
+Programming Taskbook).
+
+
+type
+ PNode = ^TNode;
+ TNode = record
+ Data: integer;
+ Next: PNode;
+ Prev: PNode;
+ Left: PNode;
+ Right: PNode;
+ Parent: PNode;
+ end;
+
+
+ PNode TNode Dynamic Tree.
+(Dynamic1Dynamic28) TNode Data Next;
+ (Dynamic29Dynamic80) Data, Next Prev.
+ ( Tree) Data, Left Right;
+ (Tree48Tree56 Tree70Tree71)
+ Parent.
+
- PNode;
+ GetP PutP ( PascalABC.NET
+, ,
+ - read
+ write).
+
PNode TNode.
+
+procedure Task(Name: string);
+
+ Name.
+ , (
+ -). ,
+ PT4, Task,
+ « Task
+ ».
+ Name
+ (, 'Begin3').
+ . ,
+ ,
+ .
+ , ,
+ .
+ Name ?
+(, 'Begin1?'),
+ .
+
4.8, Task
+ html- .
+ Name
+ #, , 'Begin3#'
+'Begin#'. html-
+ , .
+
Task #,
+ Task .
+Task #,
+ Task, .
+ Task, #,
+ html- ,
+ .
+
+
+procedure GetB(var X: boolean);
+procedure GetC(var X: char);
+procedure GetN(var X: integer);
+procedure GetR(var X: real);
+procedure GetS(var X: string);
+procedure GetP(var X: PNode);
+
+
+ ,
+ .
+ Task;
+ Task
+ «
+ Task ».
+ ;
+ «
+» ( , ,
+ ,
+ GetN).
, + , « + ». , + , , + « ».
+ PascalABC.NET Get
+ read.
+
+
+
+procedure PutB(X: boolean);
+procedure PutC(X: char);
+procedure PutN(X: integer);
+procedure PutR(X: real);
+procedure PutS(X: string);
+procedure PutP(X: PNode);
+
+
+
+, ,
+ ( ).
+Get, Task;
+
+ Task
+ .
Get,
+ Put , (
+, ).
+
+ ,
+ .
Get,
+ Put
+ .
+
+ ,
+ ,
+, .
+
PascalABC.NET Put
+ write.
+
+
+procedure Dispose(var P: PNode);
+
+
+ Dispose ,
+ Dynamic Tree.
Programming Taskbook, PascalABC.NET, + -, , + .NET. - , + PascalABC.NET , + , .NET-, +.NET, . +
+ - PascalABC.NET
+ Node, PNode TNode
+ « ». ,
+ ObjDyn ObjTree, ( Dynamic Tree)
+ «» , .NET.
+
+type
+ Node = class(IDisposable)
+ . . .
+ public
+ // :
+ constructor Create;
+ constructor Create(aData: integer);
+ constructor Create(aData: integer; aNext: Node);
+ constructor Create(aData: integer; aNext, aPrev: Node);
+ constructor Create(aLeft, aRight: Node; aData: integer);
+ constructor Create(aLeft, aRight: Node; aData: integer; aParent: Node);
+ // ( ):
+ property Data: integer;
+ property Next: Node;
+ property Prev: Node;
+ property Left: Node;
+ property Right: Node;
+ property Parent: Node;
+ // , , Node:
+ procedure Dispose;
+ end;
+
+
+ Node ObjDyn ObjTree.
+ (ObjDyn1ObjDyn28) Node
+ Data Next;
+(ObjDyn29ObjDyn80) Data, Next Prev.
+ ( ObjTree) Data, Left Right;
+
+(ObjTree48ObjTree56 ObjTree70ObjTree71) Parent.
+
Node
+;
+( 0 Data, nil ).
+
,
+IDisposable, Node
+ Dispose, ,
+ ( ,
+ ).
+ Dispose , ,
+ « Dispose
+ Node».
+
- ObjDyn ObjTree
+ Node;
+GetNode Put, .
+
+
+function GetBoolean: boolean;
+function GetChar: char;
+function GetInt: integer;
+function GetNode: Node;
+function GetReal: real;
+function GetString: string;
+
+
+ ,
+ , ,
+ .NET (
+ .NET ).
+ Task;
+ Task
+ « Task
+ ».
+
+ ;
+« » (
+ , , ,
+ GetInt).
+
, +, « +». , , + , « +». +
+
+
+procedure Put(params A: array of object);
+
+ Put ,
+, (
+). Get, Put
+ Task;
+ « Task
+».
+
-, params,
+ Put .
+ boolean, integer, real, char, string, Node.
+ Put
+ , ( ,
+ , nil. , , Node,
+ ObjDyn ObjTree.
+ ,
+ « Put
+».
+
, + ; + « ». +
+ Get, Put
+
+ .
+ ,
+ « » ,
+, « ».
+
4.9 Programming Taskbook. + + ( ).
+ + +
+procedure Show(S: string);
+
+ S .
+
,
+ S ,
+ ,
+ ( 80 ).
+ S
+ ; S
+ , S
+ ,
+ S,
+ , 80.
+
S
+ .
+ 13 (« »), 10 («
+»),
+ (#13#10).
+
+procedure Show([S: string;] A: integer[; W: integer]);
+procedure Show([S: string;] A: real[; W: integer]);
+
+Show, . + +, , + Pascal, + +. +
+, + . +
+ S ,
+ ; S
+, .
+
A .
+
W
+ (. .
+, ). W ,
+ W ; ( , W )
+ ,
+ . ,
+ (. .
+ ).
+ .
+
+ .
+
+ SetPrecision, .
+
+procedure ShowLine([S: string]);
+procedure ShowLine([S: string;] A: integer[; W: integer]);
+procedure ShowLine([S: string;] A: real[; W: integer]);
+
+ Show;
+ .
+ , Show.
+, , .
+ ShowLine ,
+ .
+
+procedure HideTask;
+
+
+, .
+ ( ,
+ ), HideTask .
+ .
+
/ + + +. +
+ + + + +
+procedure SetPrecision(N: integer);
+
+
+
+ . N ,
+ ;
+ . N
+,
+ ( );
+
+ (. . W
+Show ShowLine). N
+, N = 0.
+
,
+ SetPrecision,
+. SetPrecision
+
+.
+
ExamBegin ExamTaskC, ,
+ PT4 PT4Exam.
+ Task,
+. -
+ Pascal. PT4 PT4Exam ,
+
+( ).
+
PT4Exam
+ , ( :
+ PT4Exam Task, ).
+
+ Programming Taskbook PT4Load
+ - .
+ PascalABC.NET
+ « | » (
+
+ Shift+Ctrl+L).
, +( ).
++++
+
+ ( , , Begin1)
+ «» , ( Enter)
+
+, ( ).
+ - PascalABC.NET; ,
+ .
, Begin3 ( Begin3.pas):
+ +
+
+uses PT4;
+
+begin
+ Task('Begin3');
+
+end.
+
+
+ :
+ (RB DM ),
+
+ (, RBa1).
, , + .
+ + PAS ( )
+ .pas .
+ «»
+ pas-; .
+ , PAS « | ».
+
+
+
4.11 . + . , «m» + , ; + «()»: +
+++ + ++
, , + : +
+ +++ + + : + ++
++ + + + + + + + diff --git a/PABCNetHelp/ForEducation/PT4/Results.html b/PABCNetHelp/ForEducation/PT4/Results.html new file mode 100644 index 000000000..5264c43dd --- /dev/null +++ b/PABCNetHelp/ForEducation/PT4/Results.html @@ -0,0 +1,84 @@ + + + + ++
+ Programming Taskbook + results.abc, , + .
+ +PascalABC.NET +( PABCWork.NET, C). +( +PT4Setup) + . +
+
+ ,
+. PT4Results,
+ PascalABC.NET
+ « | » (
+
+ Shift+Ctrl+R).
PT4Results +.
+; + + , , . : + +
+
+= (C:\PABCWork)
+Begin1 A27/09 19:07 .
+Begin1 A27/09 19:07 .--2
+Begin1 A27/09 19:07 !
+For1 A27/09 19:07 .
+For1 A27/09 19:08 .
+For1 A27/09 19:10 .--3
+For1 A27/09 19:13 !
+For5 A27/09 19:15 .--2
+For5 A27/09 19:16 .
+For5 A27/09 19:19 !
+For10 A27/09 19:21 .
+For10 A27/09 19:22 .
+
+
+ A , PascalABC.NET,
+ , .
, + , . :
+ +
+
+= (C:\PABCWork.NET)
+-1- :
+27/09(19:07-19:22)[3/16] : 0:16 [3/16]
+-2- :
+Begin1 A27/09 [4] For1 A27/09 [6] For5 A27/09 [4]
+-3- :
+For10 27/09 [2]
+-5- :
+Begin 1 For 2 : 3
+
+
+PascalABC.NET + .
+ + + + + + diff --git a/PABCNetHelp/ForEducation/PT4/debug.html b/PABCNetHelp/ForEducation/PT4/debug.html new file mode 100644 index 000000000..3d221d66f --- /dev/null +++ b/PABCNetHelp/ForEducation/PT4/debug.html @@ -0,0 +1,207 @@ + + + + +4.9 Programming Taskbook , + + ( ). + , , + Programming Taskbook for MPI + + , + , , + . +, + +, . +
++, . + . +
+ ++ . + , + - : +
+ +++ ++
, + , , +. +
+ +, + ; . + + . / + + , . + , , +, HideTask. +
++ , +. + Alt+Up, Alt+Down ( ), +Alt+PgUp, Alt+PgDn ( 10 ), +Alt+Home, Alt+End ( + ). +
+, + . 7 14 + 1. + Alt+[+], Alt+[]. + +. + . +
+«» + . + + 1; + . , + , + : +
+ +++ ++
( 0 N1, N +) , + ; +«*» , + : +
+ +++ ++
+ . , + + Alt+Right Alt+Left ( + ). + , : +«*» [*], +«0»«9» +09, «10»«35» + A Z ( + + 36). +
+ ++ , + Alt +Alt- . +
+ +, + , + + , +, - + . + , , + . +
+ ++ 999; + , 999, + , + . + , , , +«» - + . +
+ +, , + . 6 + «» 9 . + 80 . +
+(. , + ): +
+, + ( +«*»), +. +
+, + , + ( , + ; + , ). + ( ) + . +
+ +, , + Windows; + Ctrl+C + . +
+ +Show ShowLine. + + , PT4. +
+ +4.11 + . , + , + . + , + , , + Windows, . +
+ +++ + ++
+ , : + , + . + , + F4. +
+ + + + + + + diff --git a/PABCNetHelp/ForEducation/PT4/gif/Color1.png b/PABCNetHelp/ForEducation/PT4/gif/Color1.png new file mode 100644 index 000000000..4974fa503 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/Color1.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/Color2.png b/PABCNetHelp/ForEducation/PT4/gif/Color2.png new file mode 100644 index 000000000..00e4d83b2 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/Color2.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/Color3.png b/PABCNetHelp/ForEducation/PT4/gif/Color3.png new file mode 100644 index 000000000..3eceefd45 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/Color3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/Color4.png b/PABCNetHelp/ForEducation/PT4/gif/Color4.png new file mode 100644 index 000000000..a8616225b Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/Color4.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/PT4Load.gif b/PABCNetHelp/ForEducation/PT4/gif/PT4Load.gif new file mode 100644 index 000000000..047076f19 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/PT4Load.gif differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/PT4Win.gif b/PABCNetHelp/ForEducation/PT4/gif/PT4Win.gif new file mode 100644 index 000000000..771d1cdda Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/PT4Win.gif differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/debug_1.png b/PABCNetHelp/ForEducation/PT4/gif/debug_1.png new file mode 100644 index 000000000..be8737a42 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/debug_1.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/debug_2.png b/PABCNetHelp/ForEducation/PT4/gif/debug_2.png new file mode 100644 index 000000000..ecee4449c Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/debug_2.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/debug_3.png b/PABCNetHelp/ForEducation/PT4/gif/debug_3.png new file mode 100644 index 000000000..13b4a9724 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/debug_3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/debug_4.png b/PABCNetHelp/ForEducation/PT4/gif/debug_4.png new file mode 100644 index 000000000..209a81f80 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/debug_4.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/demo.gif b/PABCNetHelp/ForEducation/PT4/gif/demo.gif new file mode 100644 index 000000000..ef41f3b44 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/demo.gif differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/demo_1.png b/PABCNetHelp/ForEducation/PT4/gif/demo_1.png new file mode 100644 index 000000000..0cfc9e10e Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/demo_1.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/demo_1b.png b/PABCNetHelp/ForEducation/PT4/gif/demo_1b.png new file mode 100644 index 000000000..5ecfe500e Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/demo_1b.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/demo_2.png b/PABCNetHelp/ForEducation/PT4/gif/demo_2.png new file mode 100644 index 000000000..6eaf126d5 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/demo_2.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/demo_3.png b/PABCNetHelp/ForEducation/PT4/gif/demo_3.png new file mode 100644 index 000000000..c46e75a5e Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/demo_3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/load.gif b/PABCNetHelp/ForEducation/PT4/gif/load.gif new file mode 100644 index 000000000..3006fc44e Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/load.gif differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/load_3.png b/PABCNetHelp/ForEducation/PT4/gif/load_3.png new file mode 100644 index 000000000..6b201bb06 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/load_3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/load_5.png b/PABCNetHelp/ForEducation/PT4/gif/load_5.png new file mode 100644 index 000000000..4eee430fb Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/load_5.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/load_6.png b/PABCNetHelp/ForEducation/PT4/gif/load_6.png new file mode 100644 index 000000000..435fd45bb Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/load_6.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/pspbrwse.jbf b/PABCNetHelp/ForEducation/PT4/gif/pspbrwse.jbf new file mode 100644 index 000000000..e40fb1104 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/pspbrwse.jbf differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/pt4demo.png b/PABCNetHelp/ForEducation/PT4/gif/pt4demo.png new file mode 100644 index 000000000..7c315941a Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/pt4demo.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/pt4load.png b/PABCNetHelp/ForEducation/PT4/gif/pt4load.png new file mode 100644 index 000000000..912f16681 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/pt4load.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/pt4win.png b/PABCNetHelp/ForEducation/PT4/gif/pt4win.png new file mode 100644 index 000000000..812636929 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/pt4win.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/results.gif b/PABCNetHelp/ForEducation/PT4/gif/results.gif new file mode 100644 index 000000000..00722507f Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/results.gif differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_1.png b/PABCNetHelp/ForEducation/PT4/gif/window_1.png new file mode 100644 index 000000000..d77c510c2 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_1.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_1b.png b/PABCNetHelp/ForEducation/PT4/gif/window_1b.png new file mode 100644 index 000000000..bacdd7e7a Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_1b.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_2.png b/PABCNetHelp/ForEducation/PT4/gif/window_2.png new file mode 100644 index 000000000..41e7c8547 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_2.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_3.png b/PABCNetHelp/ForEducation/PT4/gif/window_3.png new file mode 100644 index 000000000..ed181c182 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_4.png b/PABCNetHelp/ForEducation/PT4/gif/window_4.png new file mode 100644 index 000000000..810ec2348 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_4.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_5.png b/PABCNetHelp/ForEducation/PT4/gif/window_5.png new file mode 100644 index 000000000..012bed9ba Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_5.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn1.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn1.png new file mode 100644 index 000000000..52bd7a864 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn1.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn10.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn10.png new file mode 100644 index 000000000..ea3c9939b Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn10.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn2.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn2.png new file mode 100644 index 000000000..648b301a4 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn2.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn3.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn3.png new file mode 100644 index 000000000..467639950 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn4.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn4.png new file mode 100644 index 000000000..97296e47f Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn4.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn5.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn5.png new file mode 100644 index 000000000..41405bec4 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn5.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn6.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn6.png new file mode 100644 index 000000000..9fb243fcb Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn6.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn6a.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn6a.png new file mode 100644 index 000000000..b12d8e707 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn6a.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn7.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn7.png new file mode 100644 index 000000000..0c4155166 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn7.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn8.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn8.png new file mode 100644 index 000000000..e45b30cd3 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn8.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_dyn9.png b/PABCNetHelp/ForEducation/PT4/gif/window_dyn9.png new file mode 100644 index 000000000..f6f36bb69 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_dyn9.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_new3.png b/PABCNetHelp/ForEducation/PT4/gif/window_new3.png new file mode 100644 index 000000000..e0139721e Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_new3.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_new4.png b/PABCNetHelp/ForEducation/PT4/gif/window_new4.png new file mode 100644 index 000000000..24909c7f2 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_new4.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_new5.png b/PABCNetHelp/ForEducation/PT4/gif/window_new5.png new file mode 100644 index 000000000..0aadd40fb Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_new5.png differ diff --git a/PABCNetHelp/ForEducation/PT4/gif/window_new6.png b/PABCNetHelp/ForEducation/PT4/gif/window_new6.png new file mode 100644 index 000000000..820a7b0e0 Binary files /dev/null and b/PABCNetHelp/ForEducation/PT4/gif/window_new6.png differ diff --git a/PABCNetHelp/ForEducation/PT4/window.html b/PABCNetHelp/ForEducation/PT4/window.html new file mode 100644 index 000000000..61fe7ca35 --- /dev/null +++ b/PABCNetHelp/ForEducation/PT4/window.html @@ -0,0 +1,650 @@ + + + + + +4.11, , + 5 , + , + , «» + . +, , + . + +, , 4.11, + . +
+ + +, Programming +Taskbook, . + , +, . + + Begin3 PascalABC.NET ( + ). +
+: +
+++ ++
: +
+++ ++
, F4 + « (F4)», . +
+ +, + (« , +»), , , + , +( ). + «°», , +, - . + . +
+. Begin3 + a b, . + ; +«a =» «b =», a b. +
+, + : « » +« ». + - , +« » (. . +«») . + S P, +. + Ctrl+Tab. + + ; , + (, + ). +
+( , ), + : - , + . , +. +
++«». +«», Esc , + ( PascalABC.NET F9). , + + F9. +
+ + + ++ 5 , + , , + + , + . , + , +. +
++++
+ , +( + ). +
+, + ( ) (- ). +
+
+
, .
+
+«» .
+ Right Down ( ) Left Up
+( ); «» ,
+ «» , ,
+ Ctrl+Right PgDn ( ) Ctrl+Left
+ PgUp ( ). , Home
+ , End .
+
4.11, : +; . +
+, +(, . , ), + , + . + [+] []: + , , +, . +
+, + , , + , . + . + . +
+, + , ( +) , + ( , , , + ). + ( +, , ); + , + . +, ( +, - , + Up, Down PgUp, PgDn, + , , +Left, Right Ctrl-). + ( , + ). +
+, + , + . + . , +, . + + , . + , + ( ). + , . +
++ : . + Dynamic (« »). , + , + . +
+++ ++
+ : ; + + Tree. + + , , +. +
+ +4.9 , + , + . + + , PT4. +
+, F1 +( «?» ) + . 4.9, : +
+++ + + ++
4.11 . + , +( , ). +
+ +, , + + , -. +
+1. ( ): +
+++ + + ++
2. ( ): +
+++ + ++
3. ( ): +
+++ + ++
4. ( ): +
+++ ++
+ + +( + + . ). + + +( ). + + ; / + . + / , +, «: 2 5» «: 4 8». +
+- . +
+++ + ++
, + , + - . . + , + , , + . , , , + ( + , ). +
+ ++ - . , , + , , , + . ; + ( ). + ( , , + ), , ( + ) . + - , + . +
+ +++ + ++
+ . . + . + . +, + : ( ) , + , ( ) , + . + «:», + , , + . +
+( +). +
+++ ++
- + , . + - , + (, , ) , . +
+F3 «», + , : +( : ) 4.11 ( ). + + , «» , +, «» . «» ( + ) (); . +
+, + . +
+«» +«» ; «» + . +
+, , + / , + Ctrl+D ( ). + , , , , + . / + / + , , +. +
+/ + . +
+( , /) + pt4.ini + . +
+++ + ++
PT4Results +«» F2. - + ( PT4Demo +, , +- ). PT4Results; + «» . +
+ +, «» + F4 : + , + , (5 ) + , 4.11 +( - +ProgrammingABC.NET WDE), , + , , , +. +
+, pt4.ini, + . 4.11, + . +
++ , ( + ) . +
+: + ( ), + ( « »), ( +« ») ( + « »). + . + , () . + , + . , + - . +
+++ + ++
+(- ) , + . -, + . , + , . + , . + ; + : , , + , , , + . , + . , , + , . + , , + - : +, , . +
+- , + , . +
+++ + ++
+. Align31 ( +). +
+++ ++
+ , . +
+++ ++
, + , + . + , + ; . + Ctrl+Up Ctrl+Down +. +
+, + , + , Home, End, PgUp, PgDn, Up Down. +
+( ) + , + ( , , ). + Ctrl+[+] Ctrl+[]. + ( 8 ). + ( Alt+[+] Alt+[]); + . +
+++ + ++
+ + pt4.ini . + , +. ( + ) + , +. +
+, + . + + Del. + , +() , , + ( « + (Del)»): +
+++ + ++
, , + , : + Del. +
+, , + , , ( ). + : +, ( ). + «x», +« (Del)»: +
++++
( -) , ( + -) . + - ; , + + +( « »). +
+(, +, , , 5 ) + . + . + , ; + + , 1. , + : +
+++ + ++
+ , + , . + « (Ins)». + , Ins + , ( ), + ; , + : , , , : +
+++ ++
+ , + , . +
+ +( -) +, ( -) +. - + ; , + + +( « »). +
+ +/ + , . + , + +Ins . + + , , , + . +
+ + +, , +(, ), + + . , + . , + «» . , + ( , , ) + , . , + , + «», «+» «/»: +
+ +++ + ++
. + «» [] + , + «+» [+] + ; . + , . +
+«/» [/] + , . + , + . : + , . + +. +
+[], [+], [/], «» +( Ins Del, + ), + NumLock; + . +(, ) . + , + : Ctrl+PgDn [+], Ctrl+PgUp [] + Ctrl+Tab [/]. , Ctrl+Tab + , + . + , + : +
+ +++ + + + + + diff --git a/PABCNetHelp/IDE/intellisense.html b/PABCNetHelp/IDE/intellisense.html new file mode 100644 index 000000000..99d39295d --- /dev/null +++ b/PABCNetHelp/IDE/intellisense.html @@ -0,0 +1,51 @@ + + + + ++
1. +Ctrl+ .
+
+
+
+2. Shift+ + . /// + (, , +)
+
+
3. "". + , .
+
+
+
+
+ +5. +new , + + . , + .
+
+
+6. " + ", " + ", " + ".
+
+
, ,
+ abstract
+ .
+,
+ virtual
+ . :
+++
type
+ Shape = class
+ private
+ x,y: integer;
+ public
+ constructor Create(xx,yy: integer);
+ begin
+ x := xx;
+ y := yy;
+ end;
+ procedure Draw; abstract;
+ end;
, , +. .
++"" . :
++++
type
+ Point = class(Shape)
+ public
+ procedure Draw; override;
+ begin
+ PitPixel(x,y,Color.Black);
+ end;
+ end;
override
+ ,
+ .
,
+abstract.
+, :
+++
type
+ A = abstract class(Shape)
+ end;
+
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/anontypes.html b/PABCNetHelp/LangGuide/Classes/anontypes.html new file mode 100644 index 000000000..c307d0b00 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/anontypes.html @@ -0,0 +1,39 @@ + + + + + +
, . + ( ), .
+:
+var p := new class(Name := '',
+ Age := 20);
Println(p.Name,p.Age);
+p Name Age + .
++ , . :
+var p1 := new class(Name := '',
+ Age := 21);
p1 := p;
+, + - + . :
+var Name := '';
var Age := 23;
+ var p := new class(Name, Age);
+ Println(p.Name,p.Age);
++, . + . :
+var d := new DateTime(2015,5,15);
+ var p := new class(d.Day, d.Month, d.Year);
Println(p.Day,
+ p.Month, p.Year);
Println(p);
+
+
+
\ No newline at end of file
diff --git a/PABCNetHelp/LangGuide/Classes/attributes.html b/PABCNetHelp/LangGuide/Classes/attributes.html
new file mode 100644
index 000000000..bfbe29cff
--- /dev/null
+++ b/PABCNetHelp/LangGuide/Classes/attributes.html
@@ -0,0 +1,21 @@
+
+
+
+
+
++
++ + + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/autoclasses.html b/PABCNetHelp/LangGuide/Classes/autoclasses.html new file mode 100644 index 000000000..8c7e9144f --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/autoclasses.html @@ -0,0 +1,36 @@ + + + + + ++
t
class
+auto.
+ .
+ , ,
+ToString, . :
type Person = auto class
+ name: string;
age: integer;
end;
+ var p := new Person('',20); //
+
writeln(p); //
+ ToString
+writeln +, .
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/classcast.html b/PABCNetHelp/LangGuide/Classes/classcast.html new file mode 100644 index 000000000..626d51530 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/classcast.html @@ -0,0 +1,56 @@ + + + + +:
++++
type
+ Person = class
+ ...
+ end;
+ Student = class(Person)
+ ...
+ procedure IncCourse;
+ end;
+ ...
+ var
+ p: Person;
+ s: Student;
+ begin
+ p := new Student('',20,3,1); // +
+ s := Student(p); // +
+ end.
+ ( ;
+, p
+ Person).
+
+ , :
++++
s.IncCourse;
:
+++ + + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/classconstr.html b/PABCNetHelp/LangGuide/Classes/classconstr.html new file mode 100644 index 000000000..325245847 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/classconstr.html @@ -0,0 +1,92 @@ + + + + + ++
Student(p).IncCourse;
()
+, . ,
+. , ,
+ , .
+ (),
+class. read write
+ .
, Person + + . + 1:
+type
+ Person = class
+ private
+ name: string;
+ age: integer;
+ class cnt: integer := 0;
public
class
+property Coun: integer read cnt;
+ constructor (n: string; a: integer);
+ begin
+ cnt += 1;
+ name := n;
+ age := a;
+ end;
+ class function Count: integer;
+ begin
+ Result := cnt;
+ end;
+ end;
begin
+ var p: Person := new Person('',20);
+ var p1: Person := new Person('',18);
+ writeln(Person.Count); //
+Count
+end.
, +. +, .
+ () ,
+ .
+
+ class
+ .
, Person
+ - Person -
+ .
+ RandomPerson,
+Person:
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/classdefbefore.html b/PABCNetHelp/LangGuide/Classes/classdefbefore.html new file mode 100644 index 000000000..80e6d1175 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/classdefbefore.html @@ -0,0 +1,44 @@ + + + + ++
type
+ Person = class
+ private
+ class arr: array of Person;
+ name: string;
+ age: integer;
+ public
+ class constructor;
+ begin
+ SetLength(arr,3);
+ arr[0] := new Person('',20);
+ arr[1] := new Person('',19);
+ arr[2] := new Person('',35);
+ end;
+ //...
+ class function RandomPerson: Person;
+ begin
+ Result := arr[Random(3)];
+ end;
+ end;
+ const cnt = 10;
+ begin
+ var a := new Person[cnt];
+ for var i:=0 to a.Length-1 + do
+ a[i] := Person.RandomPerson;
+ end.
+ , .
+:
++++
type
+ AAA = class
+ b: BBB;
+ end;
+ BBB = class
+ a: AAA;
+ end;
,
+BBB b
+ .
+
+++
= class;
+ type:
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/constrdestr.html b/PABCNetHelp/LangGuide/Classes/constrdestr.html new file mode 100644 index 000000000..e7d1177b7 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/constrdestr.html @@ -0,0 +1,93 @@ + + + + + ++
type
+ BBB = class;
+ AAA = class
+ b: BBB;
+ end;
+ BBB = class
+ a: AAA;
+ end;
+, .
+ ,
+ ,
+ .
+ .
+function
+constructor. ,
+ .
:
++++
type
+ Person = class
+ private
+ nm: string;
+ ag: integer;
+ public
+ constructor Create(name: + string; age: integer);
+ end;
+ ...
+ constructor Person.Create(name: + string; age: integer);
+ begin
+ nm := name;
+ ag := age;
+ end;
PascalABC.NET
+ Create.
+ :
+++
type
Person = class
+ constructor (name: string; age: integer);
+ begin
+ nm := name;
+ ag := age;
+ end;
+ end;
+.NET PascalABC.NET + ( , +). +( - , - False).
+.
+1 . Object Pascal.
+, +-, . :
++++
var p: Person;
+ p := Person.Create('',20);
2 . new -
+ C# ().
+++
var p: Person;
+ p := new Person('',20);
Object Pascal -
+ ,
+ ,
+. procedure
+ destructor.
:
++++
destructor Destroy;
begin
...
end;
PascalABC.NET + , PascalABC.NET + +-.
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/constrinheritance.html b/PABCNetHelp/LangGuide/Classes/constrinheritance.html new file mode 100644 index 000000000..631941756 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/constrinheritance.html @@ -0,0 +1,76 @@ + + + + + +- . + . , +Delphi Object Pascal . +.NET, , . + - +. .NET - + , + , .
+ PascalABC.NET .
+ ,
+ , ( ,
+ ). ,
+ . , ,
+
+protected.
, .NET + ; +Object Pascal . +PascalABC.NET , + . + , + (.. ). + ( , +.NET- + - , PascalABC.NET, + ), .
+:
+type
+ A = class
+ i: integer;
+ //
+ ,
+ constructor Create(i: integer);
+ begin
+ Self.i := i;
+ end;
+ end;
+ B = class(A)
+ j: integer;
+ constructor Create;
+ begin
+ //
+
+ //
+ ,
+ j := 1;
+ end;
+ constructor Create(i,j: integer);
+ begin
+ inherited Create(i);
+ Self.j := j;
+ end;
+ end;
+ C = class(B)
+ // ,
+ //
+constructor Create(i,j: integer)
+ // ,
+
+ end;
+
, dll,
+ .NET .
+
+ extensionmethod.
+ Self .
+, :
procedure MyPrint(Self: integer);
begin
writeln(Self)
+ end;
+
procedure MyPrintEx(Self: integer);
+ extensionmethod;
begin
writeln(Self)
+ end;
+
begin
MyPrint(1);
1.MyPrintEx;
+ end.
+MyPrint - integer, MyPrintEx - + integer. MyPrintEx + , MyPrintEx .
+, , + ( , List<T>, +HashSet<T> SortedSet<T>), + . , PABCSystem + ForEach :
+procedure &ForEach<T>(Self: sequence
+ of T; action: T -> ()); extensionmethod;
+ begin
foreach x: T in
+ Self do
action(x);
end;
++:
+function operator+=<T>(a: List<T>; x: T):
+ List<T>; extensionmethod;
begin
+ a.Add(x);
Result := a;
end;
+Self.
+:
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/index_classes.html b/PABCNetHelp/LangGuide/Classes/index_classes.html new file mode 100644 index 000000000..14041552e --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/index_classes.html @@ -0,0 +1,154 @@ + + + + + +
Класс представляет собой составной тип, состоящий из полей +(переменных), методов (процедур и функций) +и свойств. Описание класса имеет вид:
++++
type
+имя класса= class
+секция1
+секция2+ ...
+ end;
Каждая секция имеет вид:
++++
модификатор доступа+описания полей
++ объявления или описания методов и описания свойств
Модификатор доступа в первой секции может отсутствовать, при этом +подразумевается модификатор internal +(видимость всюду внутри сборки).
+Методы могут описываться как внутри, так и вне класса. При описании метода +внутри класса его имя предваряется именем класса с последующей точкой. Например:
++++
type
+ Person = class
+ private
+ fName: string;
+ fAge: integer;
+ public
+ constructor Create(Name: string; Age: integer);
+ begin
+ fName := Name;
+ fAge := Age;
+ end;
procedure + Print;
property Name: string read fName;
+ property Age: integer read fAge;
end;
+ procedure Person.Print;
begin
+ writelnFormat('Имя: {0} Возраст: {1}', Name, Age);
end;
После слова class
+в скобках может быть указано имя класса-предка (см.
+Наследование), а также через запятую список поддерживаемых
+интерфейсов.
Перед словом class
+может быть указано ключевое слово sealed – в
+этом случае от класса запрещено наследовать.
Все описания и объявления внутри класса образуют +тело класса. Поля и +методы образуют интерфейс класса. Инициализаторы полей описаны здесь.
+Классы могут описываться только на глобальном уровне. Локальные определения классов (т.е. определения в +разделе описания подпрограмм) запрещены.
+В языке PascalABC.NET классы являются +ссылочными типами. +Это значит, что переменная типа класс хранит в действительности ссылку на +объект.
+Переменные типа класс называются объектами +или экземплярами класса. Они +инициализируются вызовом конструктора класса - +специального метода, выделяющего память под объект класса и инициализирующего +его поля:
++++
var p: Person := new Person('Иванов',20);
После инициализации через переменную типа класс можно обращаться к публичным +членам класса (полям, методам, свойствам), используя точечную нотацию:
++++
Print(p.Name,p.Age);
p.Print;
По умолчанию процедура write для переменной типа класс выводит
+содержимое её публичных полей и свойств в круглых скобках через запятую:
+++
write(p); // Иванов 20
Чтобы изменить это поведение, в классе следует
+переопределить виртуальный метод
+ToString класса Object - в этом случае именно он будет
+вызываться при выводе объекта.
Например:
++++
type
+ Person = class
+ + ...
+ function ToString: + string; override;
+ begin
Result := + + string.Format('Имя: {0} Возраст: {1}', + Name, Age);
+ end;
+ end;
+ ...
+ var p: Person := new Person('Иванов',20);
+ writeln(p); // Имя: Иванов Возраст: 20
Переменная типа класс является ссылкой и хранит ссылку на объект, создаваемый +вызовом конструктора.
+Как ссылка переменная типа класс может хранить значение
+nil:
+++
p := nil;
+ ...
+ if p = nil then ...
При присваивании переменных типа класс копируется только ссылка. После +присваивания обе переменные типа класс будут ссылаться на один объект +и совместно модифицировать его:
++++
var p1,p2: Person;
+ ...
+ p1 := new Person('Петров',20);
+ p2 := p1;
+ p1.IncAge;
+ p2.Print; // Имя: Петров + Возраст: 21
При сравнении переменных типа класс на равенство сравниваются ссылки, а не +значения.
++++
var p1 := new Person('Петров',20);
var p2 := new + Person('Петров',20);
writeln(p1=p2); // False
+ p2 := p1;
+ writeln(p1=p2); // True
Это поведение можно изменить, перегрузив +операцию = для класса.
+ + diff --git a/PABCNetHelp/LangGuide/Classes/indexedproperties.html b/PABCNetHelp/LangGuide/Classes/indexedproperties.html new file mode 100644 index 000000000..8b136ada0 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/indexedproperties.html @@ -0,0 +1,90 @@ + + + + + +- +, , . + , + . +
++:
++++
property Prop[]:read ++ write;
:
++++
property Prop[ind:+]:read ++ write;
+ :
++++
function GetProp(ind:+):+;
+ procedure SetProp(ind:; v:);
, a,
+Prop, a.Prop[ind] := value,
+ SetProp(ind,value),
+
+a.Prop[ind],
+GetProp(ind).
, default ;,
+ , ..
+ a[ind] a.Prop[ind].
- + , ( , ). + , + .
+/ + .
+++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/inheritance.html b/PABCNetHelp/LangGuide/Classes/inheritance.html new file mode 100644 index 000000000..449ea27bd --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/inheritance.html @@ -0,0 +1,54 @@ + + + + + ++
uses GraphABC;
+ const
+ n = 8;
+ sz = 50;
+ type ChessBoard = class
+ private
+ a: array [1..n,1..n] of boolean;
+ procedure setCell(x,y: integer; value: boolean);
+ begin
+ if value then
+ Brush.Color := clWhite
+ else Brush.Color := clBlack;
+ Fillrect((x-1)*sz+1,(y-1)*sz+1,x*sz,y*sz);
+ a[x,y] := value;
+ end;
+ function getCell(x,y: integer): boolean;
+ begin
+ Result := a[x,y];
+ end;
+ public
+ property Cells[x,y: integer]: boolean read getCell write + setCell; default;
+ end;+
var c: ChessBoard := new ChessBoard;+
begin
+ var x,y: integer;
+ for x:=1 to n do
+ for y:=1 to n do
+ c[x,y] := Odd(x+y);
+ end.
. , , + +(, +), , +, +(, +). , + , , + , () + . , + +.
+
+class.
:
++++
type
+ BaseClass = class
+ procedure p;
+ procedure q(r: real);
+ end;
+ MyClass = class(BaseClass)
+ procedure p;
+ procedure r(i: integer);
+ end;
p
+, r
+ MyClass.
, ,
+ Object - . , BaseClass
+
+Object.
class
+ sealed
+ .
() .
+ ,
+ inherited (.-
+). :
type
+ Person = class
+ private
+ name: string;
+ age: integer;
+ public
+ constructor Create(nm: string; ag: integer);
+ begin
+ name := nm;
+ age := ag;
+ end;
+ procedure Print;
+ begin
+ writeln(': ',name,' : ',age);
+ end;
+ end;
+
Student = class(Person)
+ private
+ course, group: integer;
+ public
+ constructor Create(nm: string; ag,c,gr:
+integer);
+ begin
+ inherited Create(nm,ag);
+ course := c;
+ group := gr;
+ end;
+ procedure Print;
+ begin
+ inherited Print;
+ writeln(': ',course,' : ',group);
+ end;
+ end;
Print Student
+ Print,
+Person, inherited Print.
+ Create Student
+ Create Person,
+ inherited.
+, , +, .
+ ,
+ inherited,
+ . , Student.Print
+ :
procedure Print;
+ begin
+ inherited;
+ writeln(': ',course,' : ',group);
+ end;
+
+ + . + , +. , + .
+:
++++
type
+ A = class
+ private
+ x: integer + := 1;
+ y: integer;
l := new List<integer>;
+ public
+ constructor Create(xx,yy: + integer);
+ + begin
+ + x := xx;
+ + y := yy;
+ end;
+ constructor Create;
+ + begin
+ end;
+ end;
x:=1; l := new List<integer>
+ .
//
+ + a1 -
+ , B - , a1 is
+B
+ True a1
+, B , False . :
+++
type
+ A = class
+ end;
+ B = class(A)
+ end;
+ var a1: A;
+ ...
+ a1 := B.Create;
+ writeln(a1 is B); // True
a1 -
+ , B - , a1 as
+B
+ B, a1
+B nil
+. :
++ , : +
var b1: B;
+ ...
+ b1 := a1 as B;
+
++ + + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/methods.html b/PABCNetHelp/LangGuide/Classes/methods.html new file mode 100644 index 000000000..b23e36b05 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/methods.html @@ -0,0 +1,79 @@ + + + + + ++
if a1 is B then
b1 := B(a1)
else b1 := nil;
, +. , + .
+( +Java, C#, C++), ( +Delphi, C++). + . :
++++
type
+ Rectangle = class
+ x1,y1,x2,y2: integer;
+ constructor Create(xx1,yy1,xx2,yy2: integer);
+ begin
+ x1 := xx1; + x2 := xx2;
+ y1 := yy1; + y2 := yy2;
+ end;
+ function Square: integer;
+ end;+
function Rectangle.Square: integer;
+ begin
+ Result := abs(x2-x1) * abs(y2-y1);
+ end;
, + , + .
+ .
+ .NET
+.
+ class.
+ - .
+ ;
+ :
+++
.()+
, + . , + .
+:
++++
type
Rectangle = class
+ ...
+ class procedure Move(var + r: Rectangle; dx,dy: integer);
+ begin
+ r.x1 += dx; r.x2 += dx;
+ r.y1 += dy; r.y2 += dy;
+ end;
+ end;
+ ...
+ var r := new Rectangle(10,10,100,100);
+ Rectangle.Move(r,5,5);
, + , , , +, . + .
+ ,
+. , , System.Math,
+ .
- ,
+ , . PascalABC.NET
+ .
+ T,
+ , () -
+ operator
+. +=,
+-=, *=, /=
+ () -,
+ .
:
++++
type
Complex = record
re,im: real;
+ class function operator+(a,b: Complex): Complex;
+ begin
Result.re := a.re + b.re;
Result.im := a.im + b.im; +
end;
+ class function operator=(a,b: Complex): boolean;
begin
Result := (a.re = b.re) + and (a.im = b.im);
end;
end;
:
+@ ( ), as,
+ is, new. ,
+ +=,
+ -=, *=, /=,
+ .+=, -=,
+ *=, /=
+
+ -,
+ ,
+ , -
+ .
+ -. operator implicit
+ ( )
+ operator explicit (
+ ). :
++++
type
Complex = record
+ ...
+ class function operator implicit(d: real): Complex;
+ begin
Result.re := d;
Result.im := 0;
+ end;
+ class function operator explicit(c: Complex): string;
+ begin
Result := Format('({0},{1})',c.re,c.im);
+ end;
+ class procedure operator+=(var c: Complex; +value: Complex);
begin
+ c.re += value.re; +
c.im += value.im;
+ end;
+ + class function operator+(c,c1: Complex): + Complex;
begin
+ Result.re := c.re + c1.re; +
+ Result.im := c.im + c1.im; +
+ end;
end;
- + class. , + :
+++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/properties.html b/PABCNetHelp/LangGuide/Classes/properties.html new file mode 100644 index 000000000..b42976f13 --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/properties.html @@ -0,0 +1,127 @@ + + + + + ++
function string.operator+(str: string; n: + integer): string;
begin
result := str + + n.ToString;
end;
+, , . :
++++
property Prop:read ++ write;
, + , - + . + :
++++
function getProp:+;
+ procedure setProp(v:);
+ . , + .
+
+
+
+ , . read
+ write ,
+ .
+
:
++++
type
+ Person = class
+ private
+ nm: string;
+ ag: integer;
+ procedure setAge(a: integer);
begin
+ if a>=0 then
+ ag := a
else + raise new Exception(' + ');
+ end;
+ function getId: string;
+ begin
+ Result := nm + ag.ToString;
+ end;
+ + public
+ ...
+ property Age: integer read g write setAge;
property + Name: string read nm;
property Id: string read + getId;
end;+
var p: Person;
+ p := new Person('',20);
p.Age := -3; // +
+ var + i: integer := p.Age;
+ writeln(p.Id);
, Age
+ ,
+ setAge
+ . ,
+Age, ag.
+ nm
+. , Id
+ , .
+read ,
+
+.
. , + :
++++
Inc(p.Age); // !
, +, :
++++
a := p.Age;
+ Inc(a);
+ p.Age := a;
,
+ += -= *= /=:
+++
p.Age += 1;
,
+ ,
+- . ,
+ b1
+Button,
+
+Width:
+++
b1.Width := 100;
fwidth :
+++
procedure SetWidth(w: integer);
+ begin
+ if (w>0) and (w<>fwidth) then
+ begin
+ fwidth := w;
+
+end
+ end;
+if: w<>fwidth.
+ ,
+ .
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Classes/self.html b/PABCNetHelp/LangGuide/Classes/self.html new file mode 100644 index 000000000..0c544564a --- /dev/null +++ b/PABCNetHelp/LangGuide/Classes/self.html @@ -0,0 +1,36 @@ + + + + + +
+Self, , .
+
:
++++
type
+ A = class
+ i: integer;
+ constructor Create(i: integer);
+ begin
+ Self.i := i;
+ end;
+ end;
Create
+ . Self.i
+ i ,
+ i Create.
+
+ Self.
( . +" ") - , , + , + , + .
+, + , + - (.. + ). + , , + .
+:
++++
type
+ Base = class
+ public
+ procedure Print;
+ begin
+ writeln('Base');
+ end;
+ end;
+ Derived = class(Base)
+ public
+ procedure Print;
+ begin
+ writeln('Derived');
+ end;
+ end;
Base
+ Derived Print.
+++
var b: Base := new Derived;
+ b.Print;
Print - Base Derived?
+ :
+Print Base,
+ b. ,
+
+. ,
+ ,
+ , b,
+ Derived.Print (
+, ). ,
+ , ,
+ ,
+, - .
+ ,
+ . ,
+ ,
+ .
,
+ virtual ;.
+ override:
+++
type
+ Base = class
+ public
+ procedure Print; virtual;
+ begin
+ writeln('Base');
+ end;
+ end;
+ Derived = class(Base)
+ public
+ procedure Print; override;
+ begin
+ writeln('Derived');
+ end;
+ end;
.
++++
var b: Base := new Derived;
+ b.Print;
Print
+Derived
+ .
, Print
+ .
+ ( )
+ reintroduce:
+++
type
DerivedTwice1 = class(Derived)
+ public
procedure Print;reintroduce;
+ begin
writeln('DerivedTwice1');
+ end;
end;
,
+virtual reintroduce:
+++
type
DerivedTwice2 = class(Derived)
+ public
procedure Print;virtual;+ reintroduce;
+ begin
writeln('DerivedTwice2');
+ end;
end;
+reintroduce, -
+ , . ,
+ reintroduce
+ .
+ , . , public
+ private-.
, () ,
+ . PascalABC.NET
+ : public (), private (), protected ()
+ internal ().
+ , public,
+ ,
+private
+, protected
+
+ , internal ( .NET,
+ - ,
+.exe .dll-).
+,
+private protected
+ , .
.
+ , ,
+, . ,
+ internal.
+ , .
, :
+++ : +
type
+ A = class
+ private
+ x: integer;
+ protected
+ a: integer;
public
+ constructor Create(xx: integer);
+ begin
+ x := xx; // , + .. x
+ a := 0; // +
+ end;
+ end;
+
+ type
+ B = class(A)
+ public
+
+ procedure print;
+ begin
+ writeln(a); // , ..
+ a -
+ writeln(x); // ,
+ .. -
+ end;
+ end;
+ ...
+ var b1: B := new B(5);
+ ...
+ writeln(b1.x); // , .. -
+
writeln(b1.a); // , .. a -
+
+ b1.print; // , .. print -
+
++ .
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/CompilerDirectives/index_directives.html b/PABCNetHelp/LangGuide/CompilerDirectives/index_directives.html new file mode 100644 index 000000000..95e943fe1 --- /dev/null +++ b/PABCNetHelp/LangGuide/CompilerDirectives/index_directives.html @@ -0,0 +1,88 @@ + + + + + +- +, {$ ... }. + , $ { +, .
+:
+{$ }
+{$apptype < >} - +(windows/console).
+{$reference < >} - .
+{$gendoc <>} - XML . : +true, false.
+{$mainresource < >} - .res +
+{$resource < >} - +
+{$region < >} - ( +
+{$endregion} -
+{$product < >} -
+{$version < >} -
+{$company <>} -
+{$copyright <>} -
+{$trademark < >} -
+{$include < >} - + .
+{$define <>} - , + $ifdef, $ifndef.
+{$undef <>} - , + $define.
+{$ifdef <>} - +( : " ").
+{$ifndef <>} - +( : " ").
+{$else} - "" .
+{$endif} - .
+{$faststrings} - , + .
+{$string_nullbased+} - , 0.
+{$string_nullbased-} - , 0.
+$ifdef, $ifndef $else + $endif . + $ifdef, $ifndef + $endif. $ifdef, $ifndef +$endif ( + ) $else.
+. .
+{$define DEBUG}
begin
{$ifndef
+ DEBUG}
writeln(' DEBUG ');
+ {$else}
writeln(' DEBUG ');
+ {$endif}
end.
+
+
+
diff --git a/PABCNetHelp/LangGuide/ExceptionHandling/ExeptionsExamples.html b/PABCNetHelp/LangGuide/ExceptionHandling/ExeptionsExamples.html
new file mode 100644
index 000000000..48d755859
--- /dev/null
+++ b/PABCNetHelp/LangGuide/ExceptionHandling/ExeptionsExamples.html
@@ -0,0 +1,94 @@
+
+
+
+
+1. .
+.
++++
var i: integer;
+ begin
+ readln(i);
+ writeln(i);
+ writeln(' ');
+ end.
(,
+ ), ( ),
+ writeln .
try:
+++
var i: integer;
+ begin
+ try
+ readln(i);
+ writeln(i);
+ except
+ writeln(' ');
+ end;
+ writeln(' ');
+ end.
+, except,
+ . ,
+ writeln(i).
try
+ ,
+except
+.
2. .
++++
var a,b: integer;
+ assign(f,'a.txt');
+ try
+ readln(a,b);
+ reset(f);
+ c:=a div b;
+ except
+ on System.DivideByZeroException do
+ writeln(' 0');
+ on System.IO.IOException do
+ writeln(' ');
+ end;
+ , .
+ try ...
+except try ...
+finally.
3. try
+... except try
+... finally.
+++
assign(f,'a.txt');
+ try
+ reset(f);
+ try
+ try
+ c:=a div b;
+ except
+ on System.DivideByZeroException do
+ writeln(' 0');
+ end;
+ finally
+ close(f);
+ end;
+ except
+ on System.IO.IOException do
+ writeln(' ');
+ end;
, ,
+c 0,
+ try, ,
+ - . , ,
+ 0 .
,
+ ,
+ . ,
+ Exception,
+ .
,
+.
+try
+... except.
, + , , , +. , , , + . , + :
++++
function mymod(a,b: integer): integer;
+ begin
+ Result := a - (a div b) * b;
+ end;
mymod(1,0),
+ System.DivideByZeroException
+ 0.
+ mymod:
+++
function mymod(a,b: integer): integer;
+ begin
+ if b = 0 then
+ writeln(' mymod: 0');
+ Result := a - (a div b) * b;
+ end;
, ,
+ mymod, ,
+ . , mymod
+ .
-
+ System.DivideByZeroException:
+++
try
+ readln(a,b);
+ writeln(mymod(a,b) mod (a-1));
+ ...
+ except
+ on System.DivideByZeroException do
+ writeln(' 0');
+ end;
, + , + . , + ( , "" + ).
+, :
+ System.DivideByZeroException
+ a=1 mymod.
+
+ mymod:
+++
type MyModErrorException = class(System.Exception) end; ++
function mymod(a,b: integer): integer;
+ begin
+ if b = 0 then
+ raise new MyModErrorException(' mymod: 0');
+ Result := a - (a div b) * b;
+ end;
:
++++
try
+ readln(a,b);
+ writeln(mymod(a,b) mod (a-1));
+ ...
+ except
+ on System.DivideByZeroException do
+ writeln(' 0');
+ on e: MyModErrorException do
+ writeln(e.Message);
+ else writeln('- ')
+ end;
MyModErrorException
+ System.ArithmeticException,
+System.DivideByZeroException, :
+
+++
type MyModErrorException = class(System.ArithmeticException) end;+
...+
try
+ readln(a,b);
+ writeln(mymod(a,b) mod (a-1));
+ ...
+ except
+ on e: System.ArithmeticException do
+ writeln(e.Message);
+ else writeln('- ')
+ end;
, .
+ mymod
+ System.DivideByZeroException
+ - MyModErrorException:
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/ExceptionHandling/StandardExceptions.html b/PABCNetHelp/LangGuide/ExceptionHandling/StandardExceptions.html new file mode 100644 index 000000000..a65a5e879 --- /dev/null +++ b/PABCNetHelp/LangGuide/ExceptionHandling/StandardExceptions.html @@ -0,0 +1,88 @@ + + + + + ++
function mymod(a,b: integer): integer;
+ begin
+ try
+ + Result := a - (a div b) * b;
+ except
+ on e: System.DivideByZeroException do
+ raise + new + MyModErrorException(' mymod: 0');
+ end;
+ end;
System.Exception,
+ :
+++
type
+ Exception = class
+ public
+ constructor Create;
+ constructor Create(message: string);
+ property Message: string; // +
+ propertyStackTrace: string; + //
+ end;
Message
+ , .
StackTrace
+ .
, System
+ System.SystemException:
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/ExceptionHandling/reraise.html b/PABCNetHelp/LangGuide/ExceptionHandling/reraise.html new file mode 100644 index 000000000..b694e0fba --- /dev/null +++ b/PABCNetHelp/LangGuide/ExceptionHandling/reraise.html @@ -0,0 +1,34 @@ + + + + + ++
System.OutOfMemoryException- + ;System.StackOverflowException- ( + , );
+System.AccessViolationException- + ;System.ArgumentException- + ;
+System.ArithmeticException- + . :+++
System.DivideByZeroException- + 0;
+System.OverflowException- + ;+
System.FormatException- + (, );
+System.IndexOutOfRangeException- + ;System.InvalidCastException- + ;System.NullReferenceException- + + ;System.IO.IOException- + -. :+++
System.IO.IOException.DirectoryNotFoundException- + ;
+System.IO.IOException.EndOfStreamException- + ;
+System.IO.IOException.FileNotFoundException- + .
+
+except raise
+ :
+++
raise;
:
+++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/ExceptionHandling/userExceptions.html b/PABCNetHelp/LangGuide/ExceptionHandling/userExceptions.html new file mode 100644 index 000000000..9f19e731a --- /dev/null +++ b/PABCNetHelp/LangGuide/ExceptionHandling/userExceptions.html @@ -0,0 +1,58 @@ + + + + ++
try
+ ...
+ except
+ on FileNotFoundException do
+ begin
+ log.WriteLine(' '); // +
+ raise;
+ end;
+ end;
-
+ Exception:
+++
type MyException = class(Exception) end;
- , , , + :
++++
try
+ ...
+ except
+ on MyException do
writeln(' + 0');
on Exception do
+ writeln(' ');
+ end;
, , + :
+++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Aggregate.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Aggregate.html new file mode 100644 index 000000000..7323d159e --- /dev/null +++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Aggregate.html @@ -0,0 +1,22 @@ ++
type
+ FileNotFoundException = class(Exception)
+ fname: string;
+ constructor Create(msg,fn: string);
+ begin
+ inherited Create(msg);
+ fname := fn;
+ end;
+ end;+
...+
procedure ReadFile(fname: string);
+ begin
+ if not + FileExists(fname) then
+ raise new FileNotFoundException(' + ',fname);
+ end;+
...+
try
+ ...
+ except
+ on e: FileNotFoundException do
+ writeln(' '+e.fname+' + ');
+ end;
sequence of T.
+function Aggregate(func: (T,T)->T): T;
+. . + |
+function Aggregate<Accum>(seed: T; func: (Accum,T)->Accum): T;
+. . . + |
+function Aggregate<Accum,Res>(seed: T; func: (Accum,T)->Accum; resultSelector: Accum->Res): T;
+. , . . + |
begin
var
+ a := Seq(2,3,5,6);
Println(a.Aggregate(1,(p,x) -> p*x));
+ end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Any, All.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Any, All.html
new file mode 100644
index 000000000..cc42543ec
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Any, All.html
@@ -0,0 +1,23 @@
+ sequence of T.
+function Any(): boolean;
+, - . + |
+function Any(predicate: T->boolean): boolean;
+, - . + |
+function All(predicate: T->boolean): boolean;
+, . + |
begin
var
+ a := Lst(1,3,5);
Println(a.All(x -> x mod 2 <> 0)); // True
+ Println(a.Any(x -> x mod 2 = 0)); // False
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/AsEnumerable.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/AsEnumerable.html
new file mode 100644
index 000000000..75ed68aa0
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/AsEnumerable.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function AsEnumerable(): sequence of T;
+, IEnumerable |
function Print<T>(Self:
+ array of T): array of T; extensionmethod;
+ begin
Self.AsEnumerable.Print;
Result
+ := Self;
end;
begin
+ Arr(1,2,3).Print
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Cast.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Cast.html
new file mode 100644
index 000000000..875e86cdd
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Cast.html
@@ -0,0 +1,15 @@
+ sequence of T.
+function Cast<Res>(): sequence of Res;
+System.Collections.IEnumerable . + |
begin
var
+ a: sequence of integer;
var b:
+ sequence of real;
a := Seq(1,3,5);
b :=
+ a.Cast&<real>();
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Concat.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Concat.html
new file mode 100644
index 000000000..1ed1b57a7
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Concat.html
@@ -0,0 +1,14 @@
+ sequence of T.
+function Concat(second: sequence of T): sequence of T;
+, . + |
begin
var
+ a1 := Lst(2,3,5);
var a2 := Seq(4,7,8);
+ a1.Concat(a2).Println; // 2 3 5 4 7 8
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Contains.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Contains.html
new file mode 100644
index 000000000..177f7cccd
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Contains.html
@@ -0,0 +1,18 @@
+ sequence of T.
+function Contains(value: T): boolean;
+, , . + |
+function Contains(value: T; comparer: IEqualityComparer<T>): boolean;
+, , . + |
begin
var
+ a := Lst(1,3,5,6);
Println(a.Contains(666)); // False
+ Println(666 in a); // False
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Count.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Count.html
new file mode 100644
index 000000000..4ac12efbe
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Count.html
@@ -0,0 +1,26 @@
+ sequence of T.
+function Count(): integer;
+. + |
+function Count(predicate: T->boolean): integer;
+, , . + |
+function LongCount(): int64;
+Int64, . + |
+function LongCount(predicate: T->boolean): int64;
+Int64, , . + |
begin
var
+ a := Lst(1,3,5,6);
Println(a.Count(x -> x mod 2 <> 0)); // 3
+ end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/DefaultIfEmpty.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/DefaultIfEmpty.html
new file mode 100644
index 000000000..3b1b952ba
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/DefaultIfEmpty.html
@@ -0,0 +1,18 @@
+ sequence of T.
+function DefaultIfEmpty(): sequence of T;
+, , . + |
+function DefaultIfEmpty(defaultValue: T): sequence of T;
+, , . + |
begin
var
+ a := Arr(1,2,3,4);
a.Skip(4).DefaultIfEmpty.Println; // 0
+ end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Distinct.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Distinct.html
new file mode 100644
index 000000000..33c407bae
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Distinct.html
@@ -0,0 +1,18 @@
+ sequence of T.
+function Distinct(): sequence of T;
+. + |
+function Distinct(comparer: IEqualityComparer<T>): sequence of T;
+, comparer. + |
begin
var
+ a := Arr('aaa','bbb','ccc','aaa','ccc');
a.Distinct.Println; //
+ aaa bbb ccc
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ElementAt, ElementAtOrDefault.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ElementAt, ElementAtOrDefault.html
new file mode 100644
index 000000000..ce938359c
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ElementAt, ElementAtOrDefault.html
@@ -0,0 +1,19 @@
+ sequence of T.
+function ElementAt(index: integer): T;
+. + |
+function ElementAtOrDefault(index: integer): T;
+, . + |
begin
var
+ a := Arr(1,2,3,4);
Println(a.ElementAt(2)); // 3
+ Println(a.ElementAtOrDefault(10)); // 0
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/First, FirstOrDefault.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/First, FirstOrDefault.html
new file mode 100644
index 000000000..3ba334b8c
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/First, FirstOrDefault.html
@@ -0,0 +1,28 @@
+ sequence of T.
+function First(): T;
+. + |
+function First(predicate: T->boolean): T;
+, . + |
+function FirstOrDefault(): T;
+, . + |
+function FirstOrDefault(predicate: T->boolean): T;
+, . + |
begin
var
+ a := Arr(1,2,3,4);
Println(a.Skip(2).First); // 3
+ Println(a.First(x -> x mod 2 = 0); // 2
+ Println(a.FirstOrDefault(x -> x>5); // 0
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ForEach.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ForEach.html
new file mode 100644
index 000000000..5194a386a
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ForEach.html
@@ -0,0 +1,14 @@
+ sequence of T.
+procedure ForEach(action: T->());
+. + |
begin
var
+ a := Lst(2,3,5);
var p := 1;
a.ForEach(procedure(x)
+ -> p *= x);
Println(p);
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/GroupBy.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/GroupBy.html
new file mode 100644
index 000000000..371a234a8
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/GroupBy.html
@@ -0,0 +1,47 @@
+ sequence of T.
+function GroupBy<Key>(keySelector: T->Key): IEnumerable<IGrouping<Key,T>>;
+; . + |
+function GroupBy<Key>(keySelector: T->Key; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<IGrouping<Key,T>>;
+, ; . + |
+function GroupBy<Key,Element>(keySelector: T->Key; elementSelector: T->Element): IEnumerable<IGrouping<Key,T>>;
+. ; . + |
+function GroupBy<Key,Element>(keySelector: T->Key; elementSelector: T->Element; comparer: IEqualityComparer<Key>): IEnumerable<IGrouping<Key,Element>>;
+. , . + |
+function GroupBy<Key,Res>(keySelector: T->Key; resultSelector: (Key,sequence of T)->Res): sequence of Res;
+. + |
+function GroupBy<Key,Element,Res>(keySelector: T->Key; elementSelector: T->Element; resultSelector: (Key,sequence of Element)->Res): sequence of Res;
+. . + |
+function GroupBy<Key,Res>(keySelector: T->Key; resultSelector: (Key,sequence of T)->Res; comparer: IEqualityComparer<Key>): sequence of Res;
+. . + |
+function GroupBy<Key,Element,Res>(keySelector: T->Key; elementSelector: System.T->Element; resultSelector: (Key,sequence of Element)->Res; comparer: IEqualityComparer<Key>): sequence of Res;
+. , . + |
begin
var
+ a := Arr(('',3),('',1),('',1),
+ ('',3),('',2),('',1));
var groups
+ := a.GroupBy(s->s[1]);
foreach var
+ g in groups do
begin
+ Print(g.Key+':');
g.Select(x->x[0]).Println;
+ end;
end.
:
3:
+
1:
2:
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/GroupJoin.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/GroupJoin.html
new file mode 100644
index 000000000..943791d81
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/GroupJoin.html
@@ -0,0 +1,22 @@
+ sequence of T.
+function GroupJoin<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,sequence of TInner)->Res): sequence of Res;
+. resultSelector . + |
+function GroupJoin<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,sequence of TInner)->Res; comparer: IEqualityComparer<Key>): sequence of Res;
+. . resultSelector . + |
begin
var
+ people := Arr((1,''),(2,''),(3,''));
var
+ subjects := Arr((1,''),(1,''),(2,'')
+ ,(3,''),(1,''),(2,''));
+ people.GroupJoin(subjects,p->p[0],s->s[0],(p,ss)->(p[1],ss.Select(x->x[1]))).Println(NewLine);
+ end.
:
(,[,,])
+ (,[,])
(,[])
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Join.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Join.html
new file mode 100644
index 000000000..6ab1594e3
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Join.html
@@ -0,0 +1,23 @@
+ sequence of T.
+function Join<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,TInner)->Res): sequence of Res;
+. resultSelector . + |
+function Join<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,TInner)->Res; comparer: System.Collections.Generic.IEqualityComparer<Key>): sequence of Res;
+. resultSelector . comparer. + |
begin
var
+ people := Arr((1,''),(2,''),(3,''));
var
+ subjects := Arr((1,''),(1,''),(2,'')
+ ,(3,''),(1,''),(2,''));
+ people.Join(subjects,p->p[0],s->s[0],(p,s)->(p[1],s[1])).Println(NewLine);
+ end.
:
(,)
+ (,)
(,)
(,)
(,)
+ (,)
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/JoinIntoString.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/JoinIntoString.html
new file mode 100644
index 000000000..847b76ecc
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/JoinIntoString.html
@@ -0,0 +1,14 @@
+ sequence of T.
+function JoinIntoString(delim: string := ' '): string;
+, , delim . + |
begin
var
+ a := Arr('aaa','bbb','ccc');
var s: string :=
+ a.JoinIntoString('');
Println(s); // aaabbbccc
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Last, LastOrDefault.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Last, LastOrDefault.html
new file mode 100644
index 000000000..37fd065e3
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Last, LastOrDefault.html
@@ -0,0 +1,28 @@
+ sequence of T.
+function Last(): T;
+. + |
+function Last(predicate: T->boolean): T;
+, . + |
+function LastOrDefault(): T;
+, . + |
+function LastOrDefault(predicate: T->boolean): T;
+, , , . + |
begin
var
+ a := Arr(1,2,3,4);
Println(a.Last); // 4
+ Println(a.Last(x -> x mod 2 = 0); // 4
+ Println(a.LastOrDefault(x -> x>5); // 0
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Min, Max.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Min, Max.html
new file mode 100644
index 000000000..02b46b2c8
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Min, Max.html
@@ -0,0 +1,29 @@
+ sequence of T.
+function Min(): ;
+. + |
+function Min(selector: T->): ;
+. + |
+function Max(): ;
+. + |
+function Max(selector: T->): ;
+. + |
begin
var
+ a := Lst(1,3,5,6);
Println(a.Min, a.Max);
var
+ b :=
+ Arr(('',20),('',21),('',28));
Println(b.Min(x ->
+ x[1]));
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/OfType.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/OfType.html
new file mode 100644
index 000000000..ba8f6b7f0
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/OfType.html
@@ -0,0 +1,14 @@
+ sequence of T.
+function OfType<Res>(): sequence of Res;
+System.Collections.IEnumerable . . . + |
begin
var
+ a := new object[](1,2.5,'d','ff',3.4);
a.OfType&<real>().Println;
+ end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/OrderBy, OrderByDescending.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/OrderBy, OrderByDescending.html
new file mode 100644
index 000000000..666101130
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/OrderBy, OrderByDescending.html
@@ -0,0 +1,29 @@
+ sequence of T.
+function OrderBy<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function OrderBy<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function OrderByDescending<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function OrderByDescending<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
begin
var a :=
+ Arr(('',20),('',21),('',28));
a.OrderBy(t ->
+ t[0]).Println;
+ // (,28) (,20) (,21)
a.OrderByDescending(t ->
+ t[1]).Println; // (,28) (,21) (,20)
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Print.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Print.html
new file mode 100644
index 000000000..c75a6b1d2
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Print.html
@@ -0,0 +1,18 @@
+ sequence of T.
+function Print(delim: string := ' '): sequence of T;
+, delim . + |
+function Println(delim: string := ' '): sequence of T;
+, delim , . + |
begin
var a :=
+ Arr(1,3,5);
a.Println;
+ ReadLines('a.txt').Println(NewLine);
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Reverse.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Reverse.html
new file mode 100644
index 000000000..7abb455d7
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Reverse.html
@@ -0,0 +1,14 @@
+ sequence of T.
+function Reverse(): sequence of T;
+. + |
begin
var
+ a := Range(1,9);
a.Reverse.Println; // 9 8 7 6 5 4 3 2 1
+ end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Select.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Select.html
new file mode 100644
index 000000000..9d3f9ee8d
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Select.html
@@ -0,0 +1,23 @@
+ sequence of T.
+function Select<Res>(selector: T->Res): sequence of Res;
+selector. , . + |
+function Select<Res>(selector: (T,integer)->Res): sequence of Res;
+selector, . , . + |
+
+begin
var a :=
+ Arr(1,2,3,4,5,6);
a.Select(x -> x*x).Println; // 1 4 9 16 25 36
+
end.
+
+
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/SelectMany.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/SelectMany.html
new file mode 100644
index 000000000..56531acd7
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/SelectMany.html
@@ -0,0 +1,26 @@
+ sequence of T.
+function SelectMany<Res>(selector: T->sequence of Res): sequence of Res;
+. . + |
+function SelectMany<Res>(selector: (T,integer)->sequence of Res): sequence of Res;
+. . + |
+function SelectMany<Coll,Res>(collSelector: (T,integer)->sequence of Coll; resultSelector: (T,Coll)->Res): sequence of Res;
+, . . . + |
+function SelectMany<Coll,Res>(collSelector: T->sequence of Coll; resultSelector: (T,Coll)->Res): sequence of Res;
+, . . + |
begin
var a :=
+ Arr(Arr(1,2,3),Arr(4,5,6),Arr(7,8,9));
a.SelectMany(x ->
+ x).Println; // 1 2 3 4 5 6 7 8 9
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/SequenceEqual.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/SequenceEqual.html
new file mode 100644
index 000000000..9a4e66ee8
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/SequenceEqual.html
@@ -0,0 +1,18 @@
+ sequence of T.
+function SequenceEqual(second: sequence of T): boolean;
+, . + |
+function SequenceEqual(second: sequence of T; comparer: IEqualityComparer<T>): boolean;
+, , . + |
begin
var
+ a := Arr(1,2,3);
var b := Lst(1,2,3);
+ a.SequenceEqual(b);
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Single, SingleOrDefault.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Single, SingleOrDefault.html
new file mode 100644
index 000000000..31db1ce4a
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Single, SingleOrDefault.html
@@ -0,0 +1,28 @@
+ sequence of T.
+function Single(): T;
+, 1. + |
+function Single(predicate: T->boolean): T;
+, , , . + |
+function SingleOrDefault(): T;
+, ; , . + |
+function SingleOrDefault(predicate: T->boolean): T;
+, , , ; , . + |
begin
var
+ a := Arr(1,2,3,4);
Println(a.Single); //
+ Println(a.Single(x -> x>3); // 4
Println(a.SingleOrDefault(x ->
+ x>5); // 0
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Sorted.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Sorted.html
new file mode 100644
index 000000000..783a0e17a
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Sorted.html
@@ -0,0 +1,21 @@
+ sequence of T.
+function Sorted(): sequence of T;
+. + |
+function SortedDescending(): sequence of T;
+. + |
begin
var a :=
+ Arr(6,2,7,4,8,1);
a.Sorted.Println; // 1 2 4 6 7 8
+ a.SortedDescending.Println; // 8 7 6 4 2 1
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Sum, Average.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Sum, Average.html
new file mode 100644
index 000000000..e45b560c9
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Sum, Average.html
@@ -0,0 +1,29 @@
+ sequence of T.
+function Sum(): ;
+. + |
+function Sum(selector: T->): ;
+, . + |
+function Average(): real;
+. + |
+function Average(selector: T->): real;
+, . + |
begin
var
+ a := Lst(1,3,5,6);
Println(a.Sum);
var
+ b :=
+ Arr(('',20),('',21),('',28));
Println(b.Average(x
+ -> x[1]));
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Take, TakeWhile, Skip, SkipWhile.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Take, TakeWhile, Skip, SkipWhile.html
new file mode 100644
index 000000000..dd980c09d
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Take, TakeWhile, Skip, SkipWhile.html
@@ -0,0 +1,39 @@
+ sequence of T.
+function Take(count: integer): sequence of T;
+count . + |
+function TakeWhile(predicate: T->boolean): sequence of T;
+, , . + |
+function TakeWhile(predicate: (T,integer)->boolean): sequence of T;
+, , ( ). + |
+function Skip(count: integer): sequence of T;
+count . + |
+function SkipWhile(predicate: T->boolean): sequence of T;
+, , . + |
+function SkipWhile(predicate: (T,integer)->boolean): sequence of T;
+, , ( ). + |
begin
var a :=
+ Arr(1,2,3,4,5,6);
a.Take(3).Println; // 1 2 3
a.Skip(3).Println;
+ // 4 5 6
a.Skip(2).Take(3).Println; // 3 4 5
a.TakeWhile(x
+ -> x<3).Println; // 1 2
+
a.SkipWhile(x -> x<5).Println; // 5 6
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ThenBy,ThenByDescending.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ThenBy,ThenByDescending.html
new file mode 100644
index 000000000..2ed849107
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ThenBy,ThenByDescending.html
@@ -0,0 +1,32 @@
+ sequence of T.
+function ThenBy<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function ThenBy<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function ThenByDescending<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function ThenByDescending<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+
+begin
var a
+ := Arr(('', 20), ('', 21),
('', 18),
+ ('', 28), ('', 25));
a.OrderBy(t -> t[0]).ThenBy(t ->
+ t[1]).Println;
// (,28) (,18) (,20)
+ (,25) (,21)
+
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ToArray, ToList.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToArray, ToList.html
new file mode 100644
index 000000000..de3d08882
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToArray, ToList.html
@@ -0,0 +1,20 @@
+ sequence of T.
+function ToArray(): array of T;
+. + |
+function ToList(): List<T>;
+List . + |
begin
var
+ a := Arr(1,2,3);
a := a.Select(x->x*x).ToArray;
+ var l := Lst(1,2,3);
l := l.Select(x->x*x).ToList;
+ end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ToDictionary.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToDictionary.html
new file mode 100644
index 000000000..9908261f6
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToDictionary.html
@@ -0,0 +1,27 @@
+ sequence of T.
+function ToDictionary<Key>(keySelector: T->Key): Dictionary<Key,T>;
+Dictionary . + |
+function ToDictionary<Key>(keySelector: T->Key; comparer: IEqualityComparer<Key>): Dictionary<Key,T>;
+Dictionary . + |
+function ToDictionary<Key,Element>(keySelector: T->Key; elementSelector: T->Element): Dictionary<Key,Element>;
+Dictionary . + |
+function ToDictionary<Key,Element>(keySelector: T->Key; elementSelector: T->Element; comparer: IEqualityComparer<Key>): Dictionary<Key,Element>;
+Dictionary . + |
begin
var
+ a := Arr(('',3),('',1),('',2));
var
+ d := a.ToDictionary(x->x[1],x->x[0]);
d.Println; // (3,)
+ (1,) (2,)
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ToLookup.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToLookup.html
new file mode 100644
index 000000000..6b37764c8
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToLookup.html
@@ -0,0 +1,24 @@
+ sequence of T.
+function ToLookup<Key>(keySelector: T->Key): System.Linq.ILookup<Key,T>;
+System.Linq.Lookup . + |
+function ToLookup<Key>(keySelector: T->Key; comparer: IEqualityComparer<Key>): System.Linq.ILookup<Key,T>;
+System.Linq.Lookup . + |
+function ToLookup<Key,Element>(keySelector: T->Key; elementSelector: T->Element): System.Linq.ILookup<Key,Element>;
+System.Linq.Lookup . + |
+function ToLookup<Key,Element>(keySelector: T->Key; elementSelector: T->Element; comparer: IEqualityComparer<Key>): System.Linq.ILookup<Key,Element>;
+System.Linq.Lookup . + |
+ diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/ToStr.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToStr.html new file mode 100644 index 000000000..7a6f1e37a --- /dev/null +++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/ToStr.html @@ -0,0 +1,12 @@ +
sequence of T.
+function ToStr(delim: string := ' '): string;
+, delim . + |
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Union,Intersect,Except.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Union,Intersect,Except.html
new file mode 100644
index 000000000..f1233fdde
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Union,Intersect,Except.html
@@ -0,0 +1,38 @@
+ sequence of T.
+function Union(second: sequence of T): sequence of T;
+, . + |
+function Union(second: sequence of T; comparer: IEqualityComparer<T>): sequence of T;
+, , . + |
+function Intersect(second: sequence of T): sequence of T;
+, . + |
+function Intersect(second: sequence of T; comparer: IEqualityComparer<T>): sequence of T;
+, , . + |
+function Except(second: sequence of T): sequence of T;
+, . + |
+function Except(second: sequence of T; comparer: IEqualityComparer<T>): sequence of T;
+, , . + |
begin
var
+ a := Range(1,5);
var b := Range(3,7);
+ a.Union(b).Println; // 1 2 3 4 5 6 7
+ a.Intersect(b).Println; // 3 4 5
a.Except(b).Println;
+ // 1 2
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Where.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Where.html
new file mode 100644
index 000000000..ad09cd0ab
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Where.html
@@ -0,0 +1,18 @@
+ sequence of T.
+function Where(predicate: T->boolean): sequence of T;
+. , . + |
+function Where(predicate: (T,integer)->boolean): sequence of T;
+. , . + |
begin
var a :=
+ Arr(1,2,3,5,6);
a.Where(x -> x mod 2 =
+ 0).Println; // 2 6
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/Files/Zip.html b/PABCNetHelp/LangGuide/FuncProgramming/Files/Zip.html
new file mode 100644
index 000000000..8825cc59b
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/Files/Zip.html
@@ -0,0 +1,14 @@
+ sequence of T.
+function Zip<TSecond,Res>(second: sequence of TSecond; resultSelector: (T,TSecond)->Res): sequence of Res;
+, , . + |
begin
var
+ a := Arr(1,2,3);
var b := Lst(4,5,6);
+ a.Zip(b,(x,y) -> x+y).Println; // 5 7 9
end.
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/capture_variables.html b/PABCNetHelp/LangGuide/FuncProgramming/capture_variables.html
new file mode 100644
index 000000000..3b41e95e4
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/capture_variables.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+- + . -.
+1. Select.
+begin
var a :=
+ Seq(2,3,4);
var z := 1;
var
+ q := a.Select(x->x+z);
q.Println;
z := 2;
+ q.Println;
end.
+ - x->x+z z.
+ , z
+a.Select(x->x+z), q,
+ z.
2. .
+begin
var sum :=
+ 0;
var AddToSum: integer -> () :=
+ procedure (x) -> begin sum += x;
+ end;
AddToSum(1);
AddToSum(3);
+ AddToSum(5);
writeln(sum);
end.
++ + + diff --git a/PABCNetHelp/LangGuide/FuncProgramming/extensionmethodsforsequences.html b/PABCNetHelp/LangGuide/FuncProgramming/extensionmethodsforsequences.html new file mode 100644 index 000000000..d516d72d9 --- /dev/null +++ b/PABCNetHelp/LangGuide/FuncProgramming/extensionmethodsforsequences.html @@ -0,0 +1,63 @@ + + + + + +
+ + + + + diff --git a/PABCNetHelp/LangGuide/FuncProgramming/lambdas.html b/PABCNetHelp/LangGuide/FuncProgramming/lambdas.html new file mode 100644 index 000000000..efd25765e --- /dev/null +++ b/PABCNetHelp/LangGuide/FuncProgramming/lambdas.html @@ -0,0 +1,72 @@ + + + + + +
- - , + , - + " ".
+-.
++- .
+- +, , +, .
+- label goto .
+- + .
+1.
+var f: integer -> integer := x -> x*x;
f(2);
+x -> x -, + x + integer, +x*x integer. + :
+function #fun1(x: integer): integer;
begin
+ Result := x*x;
end;
...
var
+ f: integer -> integer := #fun1;
f(2);
+ #fun1 - , . ,
+ #fun1 .
2.
+- . , +
+var a := Seq(3,2,4,8,5,5);
a.Where(x -> x
+ mod 2 = 0).Print;
+- x -> x mod 2 = 0
+ a.
3.
+var a := Seq(1,3,5);
+ writeln(a.Aggregate(0,(s,x)->s+x*x));
+-.
+4. +-.
+procedure p(f: integer -> integer);
+ begin
write(f(1));
end;
+
procedure p(f: real -> real);
begin
+ write(f(2.5));
end;
begin
+ p((x: real)->x*x);
end.
+p(x -> x) , + , p . + .
+5. -.
+procedure p(a: integer -> ());
+ begin
a(1)
end;
begin
+ p(procedure(x) -> write(x));
end.
+
+
+
diff --git a/PABCNetHelp/LangGuide/FuncProgramming/lambdasyntax.html b/PABCNetHelp/LangGuide/FuncProgramming/lambdasyntax.html
new file mode 100644
index 000000000..f883c1ef7
--- /dev/null
+++ b/PABCNetHelp/LangGuide/FuncProgramming/lambdasyntax.html
@@ -0,0 +1,67 @@
+
+
+
+
+
+- :
+_ _ ->
+
+
+_ _ ->
+
+
+function
+ _ _ ->
+
+procedure
+ _ ->
+- , :
+:+
:
++ +
( + )+
. +, , : +. " ". + .
++
var : + := -+
- +function +procedure, + , ; +
+:
+x -> x+1+
() -> 1
(x,y) -> x*y
(x,y: + integer) -> x*y
(x,y: integer): integer -> x*y
(x: integer; y: + integer) -> x*y
(x,y: integer) -> begin Result := x*y + end
(x,y: integer) -> begin Result := + x*y end
function -> 1
+ function (x,y) -> x*y
function (x,y: integer) + -> x*y
function (x,y: integer): integer -> x*y
+ function (x,y: integer): integer -> begin + Result := x*y end
procedure -> begin + write(1); write(2) end
procedure (x: + integer; s: string)-> begin write(x,s) end
+ + + diff --git a/PABCNetHelp/LangGuide/FuncProgramming/list_extensionmethodsforsequences.html b/PABCNetHelp/LangGuide/FuncProgramming/list_extensionmethodsforsequences.html new file mode 100644 index 000000000..9aa329ab1 --- /dev/null +++ b/PABCNetHelp/LangGuide/FuncProgramming/list_extensionmethodsforsequences.html @@ -0,0 +1,420 @@ + + + + + +
+function IEnumerable<T>.Print(delim: string := ' '): IEnumerable<T>;
+, delim . + |
+function IEnumerable<T>.Println(delim: string := ' '): IEnumerable<T>;
+, delim , . + |
+function IEnumerable<T>.Where(predicate: Predicate<T>): IEnumerable<T>;
+. , . + |
+function IEnumerable<T>.Where(predicate: Predicate2<T,integer>): IEnumerable<T>;
+. , . + |
+function IEnumerable<T>.Select<Res>(selector: Func<T,Res>): IEnumerable<Res>;
+selector. , . + |
+function IEnumerable<T>.Select<Res>(selector: Func2<T,integer,Res>): IEnumerable<Res>;
+selector, . , . + |
+function IEnumerable<T>.SelectMany<Res>(selector: Func<T,IEnumerable<Res>>): IEnumerable<Res>;
+. . + |
+function IEnumerable<T>.SelectMany<Res>(selector: Func2<T,integer,IEnumerable<Res>>): IEnumerable<Res>;
+. . + |
+function IEnumerable<T>.SelectMany<Coll,Res>(collSelector: Func2<T,integer,IEnumerable<Coll>>; resultSelector: Func2<T,Coll,Res>): IEnumerable<Res>;
+, . . . + |
+function IEnumerable<T>.SelectMany<Coll,Res>(collSelector: Func<T,IEnumerable<Coll>>; resultSelector: Func2<T,Coll,Res>): IEnumerable<Res>;
+, . . + |
+function IEnumerable<T>.Take(count: integer): IEnumerable<T>;
+count . + |
+function IEnumerable<T>.TakeWhile(predicate: Predicate<T>): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.TakeWhile(predicate: Predicate2<T,integer>): IEnumerable<T>;
+, , ( ). + |
+function IEnumerable<T>.Skip(count: integer): IEnumerable<T>;
+count . + |
+function IEnumerable<T>.SkipWhile(predicate: Predicate<T>): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.SkipWhile(predicate: Predicate2<T,integer>): IEnumerable<T>;
+, , ( ). + |
+function IEnumerable<T>.Sorted(): IEnumerable<T>;
+. + |
+function IEnumerable<T>.OrderBy<Key>(keySelector: Func<T,Key>): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function IEnumerable<T>.OrderBy<Key>(keySelector: System.Func<T,Key>; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function IEnumerable<T>.OrderByDescending<Key>(keySelector: System.Func<T,Key>): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function IEnumerable<T>.OrderByDescending<Key>(keySelector: System.Func<T,Key>; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function System.Linq.IOrderedEnumerable<T>.ThenBy<Key>(keySelector: Func<T,Key>): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function System.Linq.IOrderedEnumerable<T>.ThenBy<Key>(keySelector: Func<T,Key>; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function System.Linq.IOrderedEnumerable<T>.ThenByDescending<Key>(keySelector: Func<T,Key>): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function System.Linq.IOrderedEnumerable<T>.ThenByDescending<Key>(keySelector: Func<T,Key>; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function IEnumerable<T>.Concat(second: IEnumerable<T>): IEnumerable<T>;
+, . + |
+function IEnumerable<TFirst>.Zip<TSecond,Res>(second: IEnumerable<TSecond>; resultSelector: Func2<TFirst,TSecond,Res>): IEnumerable<Res>;
+, , . + |
+function IEnumerable<T>.Distinct(): IEnumerable<T>;
+. + |
+function IEnumerable<T>.Distinct(comparer: System.Collections.Generic.IEqualityComparer<T>): IEnumerable<T>;
+, comparer. + |
+function IEnumerable<T>.Union(second: IEnumerable<T>): IEnumerable<T>;
+, . + |
+function IEnumerable<T>.Union(second: IEnumerable<T>; comparer: System.Collections.Generic.IEqualityComparer<T>): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.Intersect(second: IEnumerable<T>): IEnumerable<T>;
+, . + |
+function IEnumerable<T>.Intersect(second: IEnumerable<T>; comparer: System.Collections.Generic.IEqualityComparer<T>): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.Except(second: IEnumerable<T>): IEnumerable<T>;
+, . + |
+function IEnumerable<T>.Except(second: IEnumerable<T>; comparer: System.Collections.Generic.IEqualityComparer<T>): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.Reverse(): IEnumerable<T>;
+. + |
+function IEnumerable<T>.SequenceEqual(second: IEnumerable<T>): boolean;
+, . + |
+function IEnumerable<T>.SequenceEqual(second: IEnumerable<T>; comparer: System.Collections.Generic.IEqualityComparer<T>): boolean;
+, , . + |
+function IEnumerable<T>.First(): T;
+. + |
+function IEnumerable<T>.First(predicate: Predicate<T>): T;
+, . + |
+function IEnumerable<T>.FirstOrDefault(): T;
+, . + |
+function IEnumerable<T>.FirstOrDefault(predicate: Predicate<T>): T;
+, . + |
+function IEnumerable<T>.Last(): T;
+. + |
+function IEnumerable<T>.Last(predicate: Predicate<T>): T;
+, . + |
+function IEnumerable<T>.LastOrDefault(): T;
+, . + |
+function IEnumerable<T>.LastOrDefault(predicate: Predicate<T>): T;
+, , , . + |
+function IEnumerable<T>.Single(): T;
+, 1. + |
+function IEnumerable<T>.Single(predicate: Predicate<T>): T;
+, , , . + |
+function IEnumerable<T>.SingleOrDefault(): T;
+, ; , . + |
+function IEnumerable<T>.SingleOrDefault(predicate: Predicate<T>): T;
+, , , ; , . + |
+function IEnumerable<T>.DefaultIfEmpty(): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.DefaultIfEmpty(defaultValue: T): IEnumerable<T>;
+, , . + |
+function IEnumerable<T>.ElementAt(index: integer): T;
+. + |
+function IEnumerable<T>.ElementAtOrDefault(index: integer): T;
+, . + |
+function IEnumerable<T>.Any(): boolean;
+, - . + |
+function IEnumerable<T>.Any(predicate: Predicate<T>): boolean;
+, - . + |
+function IEnumerable<T>.All(predicate: Predicate<T>): boolean;
+, . + |
+function IEnumerable<T>.Count(): integer;
+. + |
+function IEnumerable<T>.Count(predicate: Predicate<T>): integer;
+, , . + |
+function IEnumerable<T>.LongCount(): int64;
+Int64, . + |
+function IEnumerable<T>.LongCount(predicate: Predicate<T>): int64;
+Int64, , . + |
+function IEnumerable<T>.Contains(value: T): boolean;
+, , . + |
+function IEnumerable<T>.Contains(value: T; comparer: System.Collections.Generic.IEqualityComparer<T>): boolean;
+, , . + |
+function IEnumerable<T>.Aggregate(func: Func2<T,T,T>): T;
+. . + |
+function IEnumerable<T>.Aggregate<Accum>(seed: T; func: Func2<Accum,T,Accum>): T;
+. . . + |
+function IEnumerable<T>.Aggregate<Accum,Res>(seed: T; func: Func2<Accum,T,Accum>; resultSelector: Func<Accum,Res>): T;
+. , . . + |
+function IEnumerable<>.Sum(): ;
+. + |
+function IEnumerable<T>.Sum(selector: Func<T,>): ;
+, . + |
+function IEnumerable<>.Min(): ;
+. + |
+function IEnumerable<T>.Min(selector: Func<T,>): ;
+. + |
+function IEnumerable<>.Max(): ;
+. + |
+function IEnumerable<T>.Max(selector: Func<T,>): ;
+. + |
+function IEnumerable<>.Average(): real;
+. + |
+function IEnumerable<T>.Average(selector: Func<T,>): real;
+, . + |
+function IEnumerable<TOuter>.Join<TInner,Key,Res>(inner: IEnumerable<TInner>; outerKeySelector: Func<TOuter,Key>; innerKeySelector: Func<TInner,Key>; resultSelector: Func2<TOuter,TInner,Res>): IEnumerable<Res>;
+. resultSelector . + |
+function IEnumerable<TOuter>.Join<TInner,Key,Res>(inner: IEnumerable<TInner>; outerKeySelector: Func<TOuter,Key>; innerKeySelector: Func<TInner,Key>; resultSelector: Func2<TOuter,TInner,Res>; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<Res>;
+. resultSelector . comparer. + |
+function IEnumerable<TOuter>.GroupJoin<TInner,Key,Res>(inner: IEnumerable<TInner>; outerKeySelector: Func<TOuter,Key>; innerKeySelector: Func<TInner,Key>; resultSelector: Func2<TOuter,IEnumerable<TInner>,Res>): IEnumerable<Res>;
+. resultSelector . + |
+function IEnumerable<TOuter>.GroupJoin<TInner,Key,Res>(inner: IEnumerable<TInner>; outerKeySelector: Func<TOuter,Key>; innerKeySelector: Func<TInner,Key>; resultSelector: Func2<TOuter,IEnumerable<TInner>,Res>; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<Res>;
+. . resultSelector . + |
+function IEnumerable<T>.GroupBy<Key>(keySelector: Func<T,Key>): IEnumerable<IGrouping<Key,T>>;
+; . + |
+function IEnumerable<T>.GroupBy<Key>(keySelector: Func<T,Key>; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<IGrouping<Key,T>>;
+, ; . + |
+function IEnumerable<T>.GroupBy<Key,Element>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>): IEnumerable<IGrouping<Key,T>>;
+. ; . + |
+function IEnumerable<T>.GroupBy<Key,Element>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<IGrouping<Key,Element>>;
+. , . + |
+function IEnumerable<T>.GroupBy<Key,Res>(keySelector: Func<T,Key>; resultSelector: Func2<Key,IEnumerable<T>,Res>): IEnumerable<Res>;
+. + |
+function IEnumerable<T>.GroupBy<Key,Element,Res>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>; resultSelector: Func2<Key,IEnumerable<Element>,Res>): IEnumerable<Res>;
+. . + |
+function IEnumerable<T>.GroupBy<Key,Res>(keySelector: Func<T,Key>; resultSelector: Func2<Key,IEnumerable<T>,Res>; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<Res>;
+. . + |
+function IEnumerable<T>.GroupBy<Key,Element,Res>(keySelector: Func<T,Key>; elementSelector: System.Func<T,Element>; resultSelector: Func2<Key,IEnumerable<Element>,Res>; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<Res>;
+. , . + |
+function IEnumerable<T>.AsEnumerable(): IEnumerable<T>;
+, IEnumerable |
+function IEnumerable<T>.ToArray(): array of T;
+. + |
+function IEnumerable<T>.ToList(): List<T>;
+List . + |
+function IEnumerable<T>.ToDictionary<Key>(keySelector: Func<T,Key>): Dictionary<Key,T>;
+Dictionary . + |
+function IEnumerable<T>.ToDictionary<Key>(keySelector: Func<T,Key>; comparer: System.Collections.Generic.IEqualityComparer<Key>): Dictionary<Key,T>;
+Dictionary . + |
+function IEnumerable<T>.ToDictionary<Key,Element>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>): Dictionary<Key,Element>;
+Dictionary . + |
+function IEnumerable<T>.ToDictionary<Key,Element>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>; comparer: System.Collections.Generic.IEqualityComparer<Key>): Dictionary<Key,Element>;
+Dictionary . + |
+function IEnumerable<T>.ToLookup<Key>(keySelector: Func<T,Key>): System.Linq.ILookup<Key,T>;
+System.Linq.Lookup . + |
+function IEnumerable<T>.ToLookup<Key>(keySelector: Func<T,Key>; comparer: System.Collections.Generic.IEqualityComparer<Key>): System.Linq.ILookup<Key,T>;
+System.Linq.Lookup . + |
+function IEnumerable<T>.ToLookup<Key,Element>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>): System.Linq.ILookup<Key,Element>;
+System.Linq.Lookup . + |
+function IEnumerable<T>.ToLookup<Key,Element>(keySelector: Func<T,Key>; elementSelector: Func<T,Element>; comparer: System.Collections.Generic.IEqualityComparer<Key>): System.Linq.ILookup<Key,Element>;
+System.Linq.Lookup . + |
+function System.Collections.IEnumerable.OfType<Res>(): IEnumerable<Res>;
+System.Collections.IEnumerable . . . + |
+function System.Collections.IEnumerable.Cast<Res>(): IEnumerable<Res>;
+System.Collections.IEnumerable . + |
+function IEnumerable<T>.ToStr(delim: string := ' '): string;
+, delim . + |
, + , + : + (, + NET +!).
+, :
++++
function Eq<T>(a,b: T): boolean;
+ begin
+ Result := a = b;
+ end;
,
+ , ,
+ default(T) -
+ T (nil
+ ):
+++
procedure Def<T>(var a: T);
+ begin
+ a := default(T);
+ end;
, +
++++
function Sum<T>(a,b: T): T;
+ begin
+ Result := a + b;
+ end;
( + ). .NET + C++, + , + .
+
+, ,
+
+ , where
+ :
+++
type
+ MyPair<T> = class
+ where T: System.ICloneable;
+ private
+ x,y: T;
+ public
+ constructor (x,y: T);
+ begin
+ Self.x := x;
+ Self.y := y;
+ end;
+ function Clone: MyPair;
+ begin
+ Result := new MyPair<T>(x.Clone,y.Clone);
+ end;
+ end;
where
+ :
+ 1 : class
+ record
+-.
+ 2 :
+ .
+ 3 :
+constructor, ,
+ .
+, , .
+- +where, +where + .
+.
+ .
+IComparable<T>.
+++
function MinElem<T>(a: array of T): T;
+ where T: IComparable<T>;
+ begin
+ var min := a[0];
+ for var i := 1 to a.High do
+ if a[i].CompareTo(min)<0 then
+ min := a[i];
+ Result := min;
+ end;
, a[i]<min, + .
+ + + diff --git a/PABCNetHelp/LangGuide/Generics/generic_sub.html b/PABCNetHelp/LangGuide/Generics/generic_sub.html new file mode 100644 index 000000000..fcd641f5e --- /dev/null +++ b/PABCNetHelp/LangGuide/Generics/generic_sub.html @@ -0,0 +1,104 @@ + + + + + +(generic) , . + +. . +
+, + :
++++
function FindFirstInArray<T>(a: array of T; + val: T): integer;
+ begin
+ Result := -1;
+ for var i:=0 to a.Length-1 + do
+ if a[i]=val then
+ begin
+ Result := i;
+ exit;
+ end;
+ end;+
var x: array of + string;+
begin
+ SetLength(x,4);
+ x[0] := '';
+ x[1] := '';
+ x[2] := '';
+ x[3] := '';
+ writeln(FindFirstInArray(x,''));
+ end.
- ,
+
+ .
+ : T=string.
, +. ,
++++
...
+ var x: array of real;+
begin
+ SetLength(x,3);
+ x[0] := 1;
+ x[1] := 2.71;
+ x[2] := 3.14;
+ writeln(FindFirstInArray(x,1));
+ end.
. , +array of real, - +integer, T + . + real:
++++
FindFirstInArray(x,1.0)
, + :
++++
FindFirstInArray&<real>(x,1)
& , + < +"".
+, , + . :
++++
type
+ Pair<T,Q> = class
+ first: T;
+ second: Q;
+ function ChangeSecond<S>(newval: S): Pair<T, S>;
+ end;+
function Pair<T,Q>.ChangeSecond<S>(newval: S): Pair<T,S>;
+ begin
+ result := new Pair<T,S>;
+ result.first := first;
+ result.second := newval;
+ end;+
var
+ x: Pair<integer,real>;
+ y: Pair<integer,string>;
+ begin
+ x := new Pair<integer,real>;
+ x.first := 3;
+ y := x.ChangeSecond('abc');
+ writeln(y.first, y.second);
+ end.
3abc.
+ + + diff --git a/PABCNetHelp/LangGuide/Generics/generic_sub_params.html b/PABCNetHelp/LangGuide/Generics/generic_sub_params.html new file mode 100644 index 000000000..5ac556c61 --- /dev/null +++ b/PABCNetHelp/LangGuide/Generics/generic_sub_params.html @@ -0,0 +1,42 @@ + + + + + ++ . + +
+, System.Array
+
+ . , System.Array.Find
+ :
+++
System.Array.FindAll<T>(a: array of T; pred: + Predicate<T>): array of T;
a
+ T,
+pred.
:
++++
function f(x: integer): boolean;
+ begin
+ Result := ;
+ end;+
var a := Seq(1,3,6,5,8);
+ var b := System.Array.FindAll(a,x -> x mod 2 = 0);
b,
+ a
+ .
(generic)
+ , ,
+. (, ) (,
+)
+ .
+ . , Stack<T> -
+ T,
+ T,
+Stack<integer> -
+integer.
+:
++++
type
+ Node<T> = class
+ data: T;
+ next: Node<T>;
+ public
+ constructor Create(d: T; nxt: Node<T>);
+ begin
+ data := d;
+ next := nxt;
+ end;
+ end;
+ Stack<T> = class
+ tp: Node<T>;
+ public
+ procedure Push(x: T);
+ begin
+ tp := new Node<T>(x,tp);
+ end;
+ function Pop: T;
+ begin
+ Result := tp.data;
+ tp := tp.next;
+ end;
+ function Top: T;
+ begin
+ Result := tp.data;
+ end;
+ function IsEmpty: boolean;
+ begin
+ Result := tp = nil;
+ end;
+ end;
:
++++
var
+ si: Stack<integer>;
+ sr: Stack<real>;
+ begin
+ si := new Stack<integer>;
+ sr := new Stack<real>;
+ for var i := 1 to 10 do
+ si.Push(Random(100));
+ while not si.IsEmpty do
+ sr.Push(si.Pop);
+ while not sr.IsEmpty do
+ write(sr.Pop,' ');
+ end.
- +.
++ + + diff --git a/PABCNetHelp/LangGuide/Interfaces/indexinterf.html b/PABCNetHelp/LangGuide/Interfaces/indexinterf.html new file mode 100644 index 000000000..b8ab587a3 --- /dev/null +++ b/PABCNetHelp/LangGuide/Interfaces/indexinterf.html @@ -0,0 +1,115 @@ + + + + + +
-
+ , ,
+ . type
+ :
+++
=interface
+end;
, + +read write.
+:
++++
type
IShape = interface
+ procedure Draw;
property X: integer + read;
property Y: integer read;
+ end;
+ ICloneable = interface
function + Clone: Object;
end;
.
+ ,
+
+public-.
+ ,
+. .
+
+class
+( , ).
:
++++
type
Point = class(IShape,ICloneable)
+ private
+ xx,yy: integer;
+ public
+ constructor Create(x,y: integer);
+ begin
+ xx := x; yy := y;
+ end;
procedure + Draw; begin end;
property X: integer + read xx;
property Y: integer read yy;
+ function Clone: Object;
+ begin
+ Result := new Point(xx,yy);
+ end;
+ procedure Print;
+ begin
+ write(xx,' ',yy);
+ end;
end;
+:
+++ ++
type
+ IPosition = + interface
+ property X: integer read;
property + Y: integer read;
end;
+ IDrawable = + interface
procedure Draw;
end;
+ IShape = + interface(IPosition,IDrawable)
end;
+++
var ip: IShape := new Point(20,30);
+ ip.Draw;
+ Point(ip).Print;
, ,
+ virtual
+ override.
+, ip.Draw
+Draw Point.
+, .
+ , , ,
+ virtual:
type
Point = class(IShape,ICloneable)
+ ...
+
+ function Clone: Object; virtual;
+ begin
+ Result := new Point(xx,yy);
+ end;
+ end;
, ,
+ is as:
++ + + diff --git a/PABCNetHelp/LangGuide/Interfaces/manyinterf.html b/PABCNetHelp/LangGuide/Interfaces/manyinterf.html new file mode 100644 index 000000000..363476142 --- /dev/null +++ b/PABCNetHelp/LangGuide/Interfaces/manyinterf.html @@ -0,0 +1,48 @@ + + + + + ++
if ip is Point then
+ ...
+ var p: Point := ip as Point;
+ if p<>nil then
+ writeln(' ');
+. + :
++++
type
+ IShape = interface
+ procedure Draw;
property X: integer read;
+ property Y: integer read;
+ end;
+ IBrush = interface
+ procedure Draw;
property + Size: integer read;
+ end;
+ Brush = class(IShape,IBrush)
+ // Draw +
+ end;
,
+.NET
+ ,
+ .
+PascalABC.NET ,
+, , .NET,
+. , integer
+ IComparable:
+++
var i: integer := 1;
+ var res : integer := IComparable(i).CompareTo(2);
+ // i.CompareTo(2) + -
+ + + diff --git a/PABCNetHelp/LangGuide/MemoryManagement/index_memory.html b/PABCNetHelp/LangGuide/MemoryManagement/index_memory.html new file mode 100644 index 000000000..5cf75d124 --- /dev/null +++ b/PABCNetHelp/LangGuide/MemoryManagement/index_memory.html @@ -0,0 +1,44 @@ + + + + + +
.NET
+ .
+ ,
+ . ,
+ nil.
+, , +. . + , + . .
+,
++++
type
+ Person = class
+ ...
+ end;
+ var p: Person := new Person('',20);
+ ...
+ p := nil;
, p,
+ nil
+ .
, , +New, , + Dispose. + PascalABC.NET + .
+ + + diff --git a/PABCNetHelp/LangGuide/Modules/cyclemodules.html b/PABCNetHelp/LangGuide/Modules/cyclemodules.html new file mode 100644 index 000000000..d95c13c95 --- /dev/null +++ b/PABCNetHelp/LangGuide/Modules/cyclemodules.html @@ -0,0 +1,51 @@ + + + + + ++ . , + +:
++++
unit A;
+ interface
+ uses B;
+ implementation
+ end.
+
+ unit B;
+ interface
+ uses A;
+ implementation
+ end.
, + , .
+, , + - , - , + :
+++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Modules/doccomments.html b/PABCNetHelp/LangGuide/Modules/doccomments.html new file mode 100644 index 000000000..f81954aea --- /dev/null +++ b/PABCNetHelp/LangGuide/Modules/doccomments.html @@ -0,0 +1,55 @@ + + + + + ++
unit A;
+ interface
+implementation
+ uses B;
+end.
+
+ unit B;
+ interface
+ uses A;
+ implementation
+ end.
, , , , , + . + + , + , . + Intellisense.
+, + , ///. +:
++++
const
/// Pi
Pi = + 3.14;
type
/// TTT -
+ TTT = integer;
/// XXX
+ XXX = class
end;
/// + p
procedure p(a : + integer);
begin
end;
+ var
/// t1
+ t1: TTT;
, + /// . + +///-, + . :
++++
///- Exclude(var s : set of T; el : T)
/// el + s
procedure Exclude(var s: + TypedSet; el: object);
+///--, . + , .
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Modules/indexmodule.html b/PABCNetHelp/LangGuide/Modules/indexmodule.html new file mode 100644 index 000000000..78b63561a --- /dev/null +++ b/PABCNetHelp/LangGuide/Modules/indexmodule.html @@ -0,0 +1,105 @@ + + + + + +
+ . , , ,
+, .
+ ( ),
+ ( .pas) uses
+ . (.pas)
+ (.pcu)
+, , Lib
+ PascalABC.NET.
:
++++
unit;+
interface+
++
implementation+
++
initialization+
+
finalization+
+
end.
+ .
+. + .
+
+ uses
+ .NET.
+uses .
+
+, (
+ uses).
+, , , , , .
+ ,
+.
, + , . , + , + .
+
+ , ;.
+ ,
+
+- .
+
+ . ,
+.
+
++++
begin
+
+end.
:
+++ + + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Modules/libraries.html b/PABCNetHelp/LangGuide/Modules/libraries.html new file mode 100644 index 000000000..2150e9d8a --- /dev/null +++ b/PABCNetHelp/LangGuide/Modules/libraries.html @@ -0,0 +1,113 @@ + + + + + + ++
unit Lib;+
interface+
uses GraphABC;+
const Dim = 5;
+ var Colors: array [1..Dim] of integer;+
function RandomColor: integer;
+ procedure FillByRandomColor;+
implementation+
function RandomColor: integer;
+ begin
+ Result := RGB(Random(255),Random(255),Random(255));
+ end;
+ procedure FillByRandomColor;
+ begin
+ for i: integer := 1 to Dim do
+ Colors[i] := RandomColor;
+ end;+
initialization
+ FillByRandomColor;
+ end.
dll (dynamically linked libraries):
+.dll (), + ( ). + .
++, , .
++++
library;+
interface+
++
implementation+
++
end.
pas-, +.
+- +, + ( ).
+.dll-, + .
++ {$reference +}. +:
+++{$reference ABC.dll}
+
{$reference ABC1.dll}
+
begin
writeln(a.GetType);
end.
.
+ABC ABC1 :
+++ +library ABC;
+var a: integer;
+end.
+
++library ABC1;
+var a: real;
+end.
+
, , + uses , - + .
+a + integer.
++ :
+++{$reference ABC.dll}
+
{$reference ABC1.dll}
+
begin
writeln(ABC1.a.GetType);
+ end.
+ + + diff --git a/PABCNetHelp/LangGuide/Modules/simplemodule.html b/PABCNetHelp/LangGuide/Modules/simplemodule.html new file mode 100644 index 000000000..71ece6678 --- /dev/null +++ b/PABCNetHelp/LangGuide/Modules/simplemodule.html @@ -0,0 +1,36 @@ + + + + + +
+ :
+++ ++
unit;+
++
end.
+++
unit;+
+
begin+
+
end.
, , +, , , . . + - + , , .
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Modules/uses.html b/PABCNetHelp/LangGuide/Modules/uses.html new file mode 100644 index 000000000..37f17c29d --- /dev/null +++ b/PABCNetHelp/LangGuide/Modules/uses.html @@ -0,0 +1,84 @@ + + + + + + + uses
+uses,
+:
+++
uses;
+ PascalABC.NET, + .NET. :
++++
usesSystem, System.Collections.Generic, MyUnit;
MyUnit -
+PascalABC.NET,
+ .pcu-,
+System System.Collections.Generic
+- .NET.
,
+uses,
+ PascalABC.NET
+ .NET.
+ .NET ,
+ , .NET
+ -
+
+ {$reference },
+ - dll-,
+ .NET-.
+ , ,
+ ,
+uses.
+, .NET
+$reference, ,
+ ,
+uses. :
+++
begin
+ System.Console.WriteLine('PascalABC.NET');
+ end.
uses
+ PABCSystem,
+, , . uses
+, PABCSystem . ,
+$reference System.dll, System.Core.dll
+mscorlib.dll, .NET-.
+ , ,
+ uses
+ . ,
+ .
+, .
+ ,
++ ++
.
++NET
+.
+ program.
OpenMP + + (, + ). OpenMP + : + , .
+OpenMP , + , + .
+PascalABC.NET OpenMP:
+parallel for parallel sections)
+ critical)
+ :
+{$omp directive-name [[[,] ]...]}
+
+
$omp ,
+OpenMP, directive-name , parallel,
+ . ,
+ .
OpenMP + Samples/OMPSamples
+ +.
++ + + + ++ + + diff --git a/PABCNetHelp/LangGuide/OpenMP/parallelfor.html b/PABCNetHelp/LangGuide/OpenMP/parallelfor.html new file mode 100644 index 000000000..161b765e1 --- /dev/null +++ b/PABCNetHelp/LangGuide/OpenMP/parallelfor.html @@ -0,0 +1,145 @@ + + + + + +
parallel for
+ .
+++
{$omp parallel for}
+ + for var i: integer:=1 to 10 do
+
+ . , , + , , +, , + , .
+, , , +, , + . , +, , +.
+ private , ,
+. :
+++
{$omp parallel for private( )}
.
++++
var a,b: integer;
+ {$omp parallel for private(a, b)}
+ + for var i: integer:=1 to 10 do
+ a := ...
a b , + .
+: + .
+. + + , + , + .
++++
{$omp parallel for}
+ + for var i:=1 to 2 do
+ a[i] := a[i+1];
, + . + , + .
++++
var a:integer;
+ {$omp parallel for}
+ + for var i:=1 to 10 do
+ begin
+ a := i;
+ ... := a; // a
+ end;
a 1 +10.
+, + . + , + .
++
- +. , + .
+++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/OpenMP/reduction.html b/PABCNetHelp/LangGuide/OpenMP/reduction.html new file mode 100644 index 000000000..d8ccee42b --- /dev/null +++ b/PABCNetHelp/LangGuide/OpenMP/reduction.html @@ -0,0 +1,103 @@ + + + + + ++
uses Arrays;
+
+ procedure ParallelMult(a,b,c: array [,] of real; n: + integer);
+ begin
+ {$omp parallel for }
+ for var i:=0 to + n-1 do
+ for var j:=0 to n-1 do
+ begin
+ c[i,j]:=0;
+ for var l:=0 to + n-1 do
+ c[i,j]:=c[i,j]+a[i,l]*b[l,j];
+ end;
+ end;
+
+ procedure Mult(a,b,c: array [,] of real; n: integer);
+ begin
+ for var i:=0 to + n-1 do
+ for var j:=0 to n-1 do
+ begin
+ c[i,j]:=0;
+ for var l:=0 to + n-1 do
+ c[i,j]:=c[i,j]+a[i,l]*b[l,j];
+ end;
+ end;
+
+ const n = 400;
+
+ begin
+ var a := + Arrays.CreateRandomRealMatrix(n,n);
+ var b := + Arrays.CreateRandomRealMatrix(n,n);
+ var c := new real[n,n];
+ ParallelMult(a,b,c,n);
+ writeln(' : + ',Milliseconds,' ');
+ var d := Milliseconds;
+ Mult(a,b,c,n);
+ writeln(' : + ',Milliseconds-d,' ');
+ end.
, + , + . + , , . + :
++++
var a: integer:=0;
+ {$omp parallel for}
+ for var i:integer:=1 to 100 do
+ a := a+1;
, + a, + a. , +, . +, .
+ reduction :
+++
{$omp parallel for reduction( : )}
, , + . + , + + .
++++
var a: integer := 1;
+ {$omp parallel for reduction(+:a)}
+ for var i: integer:=1 to 2 do
+ a := a+1;
a , + + , + a 1. + (1) , + a 3, +.
+, + :
++
| reduction | ++ |
| + | +0 | +
| * | +1 | +
| - | +0 | +
| and () | +~0 ( ) | +
| or () | +0 | +
| xor () | +0 | +
| and () | +true | +
| or () | +false | +
parallel sections
+ , .
+++
{$omp parallel sections}
+ + begin
+ 1;
+ 2;
+ ...;
+ end;
begin ... end,
+ .
+++
{$omp parallel sections}
+ + begin
+ 1;
+ 2;
+ begin
+ 3;
+ 4;
+ 5;
+ end;
+ end;
, 1,
+2 begin ... end, 3-5.
, , , +, , , + , . , + , , +.
+, + , + .
+ + + diff --git a/PABCNetHelp/LangGuide/OpenMP/sync.html b/PABCNetHelp/LangGuide/OpenMP/sync.html new file mode 100644 index 000000000..122930279 --- /dev/null +++ b/PABCNetHelp/LangGuide/OpenMP/sync.html @@ -0,0 +1,66 @@ + + + + + + critical
+.
+++
{$omp critical }
+ ;
, + .
++. , + , , + .
+, + .
++++
var a:integer:=0;
+ {$omp parallel for}
+ for var i:integer:=1 to 100 do
+ {$omp critical}
+ a:=a+1;
.
+a:=a+1 .
+
+ .
+, .
+ .
++++
var a:integer := 0;
+ {$omp parallel sections}
+ begin
+ {$omp critical}
+ a:=1;
+ {$omp critical}
+ a:=a+1;
+ end;
a , . + , a , +.
+. +, , A, + B. , + B, A. + : +. , + . +, . + .
+ + + diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/IfOperation.html b/PABCNetHelp/LangGuide/Operations_Expressions/IfOperation.html new file mode 100644 index 000000000..8e296008b --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/IfOperation.html @@ -0,0 +1,28 @@ + + + +:
+++?1:2 +
, 1, + 2.
+:
++++
var min := a < b ? a : b;
, + . , a b + :
+++ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/Slice.html b/PABCNetHelp/LangGuide/Operations_Expressions/Slice.html new file mode 100644 index 000000000..486276b03 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/Slice.html @@ -0,0 +1,102 @@ + + + ++
var min: real;
if a<b then
+ min := a
else min := b;
- , List<T> , + .
+:
+
+ a[from:to]
+
+
+
+a[from:to:step]
+
+
+
+a?[from:to]
+
+
+
+a?[from:to:step]
+
+ [from,
+to)
+ step. [from,
+to) ,
+from
+, to - .
+ from,
+to, step
+ .
step , , +step=1, .. + .
+: + , - List<T> +List<T>.
+. from , + . +to 1, .. + [-1..a.Count] List<T> + [0..s.Length+1] , +.
++step=0, .
+
+a?
+
+. .
+ .
+ ,
+.
:
++++
var a := Arr(0,1,2,3,4,5,6);
Println(a[2:5]); // [2,3,4]
+ Println(a[2:a.Length]); // [2,3,4,5,6]
Println(a[2:1000]); // !
Println(a?[2:1000]); + // [2,3,4,5,6]
Println(a[2:7:2]); // [2,4,6]
+ Println(a[2:0]); //
var s := '0123456';
+ Println(s[2:5]); // 123
Println(s[0:2]); // !
Println(s?[0:2]); + // 12
Println(s?[-2::2]); // 135
Println(s[2:s.Length]); // 12345
step . :
++++
var a := Arr(0,1,2,3,4,5,6);
Println(a[5:2:-1]); // + [5,4,3]
Println(a[2:5:-1]); //
+ Println(a[a.Length-1:-1:-2]); // [6,4,2,0]
from +to , + . +step>0, from + , to + + 1. +step<0, +from +, to - + - 1.
+:
++++
var s := '0123456';
Println(s[2:]); // 23456
+ Println(s[:4]); // 012
Println(s[::-1]); // 6543210
Slice, +, List<T>, . , + - : a.Slice(from,step,count).
+
+
@
+ .
+ . :
++ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/arithmop.html b/PABCNetHelp/LangGuide/Operations_Expressions/arithmop.html new file mode 100644 index 000000000..a8471ad5f --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/arithmop.html @@ -0,0 +1,219 @@ + + + ++
var
+ r: real;
+ pr: ^real := @r;
++, -,
+*, / ,
+div mod
++ - .
+x op y,
+op -
++, - *,
+ :
+
| + | shortint |
+ byte |
+ smallint |
+ word |
+ integer |
+ longword |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
shortint |
+ integer |
+ integer |
+ integer |
+ integer |
+ integer |
+ int64 |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
byte |
+ integer |
+ integer |
+ integer |
+ integer |
+ integer |
+ longword |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
smallint |
+ integer |
+ integer |
+ integer |
+ integer |
+ integer |
+ int64 |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
word |
+ integer |
+ integer |
+ integer |
+ integer |
+ integer |
+ longword |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
integer |
+ integer |
+ integer |
+ integer |
+ integer |
+ integer |
+ int64 |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
longword |
+ int64 |
+ longword |
+ int64 |
+ longword |
+ int64 |
+ longword |
+ uint64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
int64 |
+ int64 |
+ int64 |
+ int64 |
+ int64 |
+ int64 |
+ uint64 |
+ int64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
uint64 |
+ uint64 |
+ uint64 |
+ uint64 |
+ uint64 |
+ uint64 |
+ uint64 |
+ uint64 |
+ uint64 |
+ BigInteger |
+ single |
+ real |
+
BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ BigInteger |
+ - | +- | +
single |
+ single |
+ single |
+ single |
+ single |
+ single |
+ single |
+ single |
+ single |
+ - | +single |
+ real |
+
real |
+ real |
+ real |
+ real |
+ real |
+ real |
+ real |
+ real |
+ real |
+ - | +real |
+ real |
+
, - , +, .
+ uint64
+ uint64,
+ , .
/ :
+ real.
div mod , .
+ div
+mod - :
+++
x div y- +xy. + ,x div y = x / y, + 0;- +
+ x mod yxy. , +x mod y = x - (x div y) * y.
++ .
+ - ,
+ integer, integer,
+longword int64
+- int64, uint64 - , single real -
+single real.
+ ,
+ .
+
+ and, or, not,
+xor, shl, shr.
+ .
+ and, or,
+xor , .
+ shl, shr
+ , not
+- .
+ : (0 + False, 1 - True) + . :
++++
00010101 and 00011001 = 00010001
+ 00010101 or 00011001 = 00011101
+ 00010101 xor 00011001 = 00001100
+ not 00010101 = 11101010
+( ).
++ shl +shr :
++++
+a shl n
a shr n +
+ n - , a - .
+
+
+a shl n ,
+ a n .
+ .
+
+a shr n ,
+ a n .
+:
++++
+3 shl 2 = 12
12 shr 2 = 3
+ 3=112, 2 112 11002=12, +12=11002 2 112=3.
++
++
+ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/expressions.html b/PABCNetHelp/LangGuide/Operations_Expressions/expressions.html new file mode 100644 index 000000000..811107ed9 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/expressions.html @@ -0,0 +1,135 @@ + + + +//
+ . . , , , . , , . Pascal ABC : @, not, ^, *, /, div, mod, and, shl, shr, +, -, or, xor,
+in, =>, =, >, <, <>, <= >=.
++ - * / ,
+div mod
++ - . ,
+ , . :
+/, integer, real. , b byte,
+c 1..9,
+b+c -b integer, 2.0+b 1/2 - real.
+ and, or xor,
+ not,
+
+ boolean
+boolean. ,
+boolean, .
+<, >, <=, >=, =, <> boolean
+, , , ,
+ . = <> pointer, ,
+ nil.
+ 1.
+ and, or, not,
+xor, shl, shr
+ .
+not , .
+ integer.
+, b
+byte
+b=1, b shl 10=1024, not b=254.
<, >, <=, >=, =, <>,
+ () +. .
+, 'a'+'b'='ab'.
@
+ .
+ ^:
+ p T,
+ p^ - T,
+ p.
+ + (), -
+() * ():
+++
var
+ s1,s2,s: set of byte;
+ begin
+ s1:=[1..4];
+ s2:=[2..5];
+ s:=s1+s2; // s=[1..5]
+ s:=s1-s2; // s=[1]
+ s:=s1*s2; // s=[2..4]
= (), <>
+(), <= ()
+>= ():
+++
var
+ s1,s2,s: set of byte;
+ b: boolean;
+ begin
+ s1:=[1..4];
+ s2:=[2..5];
+ s:=[1,2];
+ b:=s1=s2; // b=False
+ b:=s2<>s; // b=True
+ b:=s<=s2; // b=False
+ b:=s1>=s; // b=True
, in
+, :
+++
1 in [2..5] // False
+ 3 in [2..5] // True
. + , . , + , .
++
@,
+ not,
+ ^
+ |
+ 1 () | +
*,
+ /,
+ div,
+ mod,
+ and,
+ shl,
+ shr |
+ 2 | +
+,
+ -,
+ or,
+ xor |
+ 3 | +
=,
+ <>,
+ <,
+ >,
+ <=,
+ >=,
+ in,
+ =>
+ |
+ 4 () | +
++ ++
+++
(+)
+ , + ( + +). +, , + , , + , + .
++ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/index_expressions.html b/PABCNetHelp/LangGuide/Operations_Expressions/index_expressions.html new file mode 100644 index 000000000..2650517e8 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/index_expressions.html @@ -0,0 +1,49 @@ + + + +
PascalABC.NET : @, not, ^, *, /, div, mod, and, shl, shr, +, -, or, xor, =, >, <, <>, <=, >=,
+as, is,
+in, new
+ . @,
+-, +, ^, not, new
+ ( ),
+ ( ),
++
+- .
. +PascalABC.NET , + .
+ +.
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/isasop.html b/PABCNetHelp/LangGuide/Operations_Expressions/isasop.html new file mode 100644 index 000000000..c1471293b --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/isasop.html @@ -0,0 +1,73 @@ + + + +
+is :
+++
a isClassType
True
+a ClassType
+ .
, Base
+ Derived - , ,
+Derived - Base,
+ b d Base
+ Derived,
+b is Base d is
+Base True,
+ b is Derived - False.
+as :
+++
a asClassType
+ClassType ,
+ nil.
,
++++
type
+ Base = class
+ end;
+ Derived = class(Base)
+ procedure p;
+ begin
+ end;
+ end;+
var b: Base;+
begin
+ b := new Base;
+ writeln(b is Derived);
+ b := new Derived;
+ writeln(b is Derived);
+ end.
False,
+ - True.
is
+as
+ , .
1 .
++++
if b is Derived then
+ Derived(b).p;
2 .
+++ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/logicop.html b/PABCNetHelp/LangGuide/Operations_Expressions/logicop.html new file mode 100644 index 000000000..3bdf454e2 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/logicop.html @@ -0,0 +1,39 @@ + + + ++
var d: Derived := b as Derived;
+ d.p;
+ and, or xor,
+ not,
+
+ boolean
+boolean.
+ : a and b
+ , a
+b, a or b
+ , a,
+ b, a xor b
+ , a
+ b ,
+not a , a
+.
and
+or
+ :
++ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/newop.html b/PABCNetHelp/LangGuide/Operations_Expressions/newop.html new file mode 100644 index 000000000..60357fedf --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/newop.html @@ -0,0 +1,43 @@ + + + ++
x and y+x, + ,y;
+x or y+x, , +y.
+
+new :
+++
new()
+ .
+:
++++
type
+ My = class
+ constructor Create(i: integer);
+ begin
+ end;
+ end;+
var m: My := new My(5);
+ Object Pacal:
++++
var m: My := My.Create(5);
+, :
++++
var m := new My(5);
, +. +( ) .
+
+
. + , . , + , .
++
@,
+ not,
+ ^, +, - (), new
+ |
+ 1 () | +
*,
+ /,
+ div,
+ mod,
+ and,
+ shl,
+ shr,
+ as,
+ is |
+ 2 | +
+,
+ - (),
+ or,
+ xor |
+ 3 | +
=,
+ <>,
+ <,
+ >,
+ <=,
+ >=,
+ in |
+ 4 | +
?: |
+ 5 () | +
+ .
+
+
+ = <>.
+ ^:
+ p T,
+ p^ - T,
+ p. pointer
+ .
+<, >, <=, >=, =, <> boolean
+ .
= <>
+. ,
+ - . ,
+ =
+<>.
+ , .
+
+ + (), -
+() * (),
++=, -=
+*=:
+++
var s1,s2,s: set of byte;
+ begin
+ s1 := [1..4];
+ s2 := [2..5];
+ s := s1 + s2; // s = [1..5]
+ s := s1 - s2; // s = [1]
+ s := s1 * s2; // s = [2..4]
// s += + s1 s := s + s1
// s -= + s1 s := s - s1
// s *= + s1 s := s * s1
s += + [3..6]; // s = [2..6]
+ s -= [3]; + // s = [2,4..6]
+ s *= [1..5]; // s = [2,4..5] +
+ end.
+ = (), <>
+(), <= ( ), < ( ), >= ( )
+> ( ):
+++
[1..3] = [1,2,3]
+ ['a'..'z'] <> ['0'..'9']
+ [2..4] < [1..5]
+ [1..5] <= [1..5]
+ [1..5] > [2..4]
+ [1..5] >= [1..5]
, [1..5] < [1..5].
, in
+, : 3 in [2..5]
+ True, 1 in [2..5] False.
+
<, >, <=, >=, =, <>.
+
+: s1 < s2
+ i s1[i]<s2[i]
+ , s1
+s2.
+
,
+ () +, .
+
, 'a'+'b'='ab'.
+=:
+
+++
s += s1; // s := s + s1;
, + :
+s := ': '+15; // s = ': 15'
s :=
+20.5+''; // s = '20.5'
s += 1; // s = '20.51'
+
+*: +s*n n*s + , s, + n :
+s := '*'*10; // s = '**********'
s := 5*'ab' // s = 'ababababab'
s := 'd'; s *= 3; // s =
+'ddd'
+
+
\ No newline at end of file
diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/typecast.html b/PABCNetHelp/LangGuide/Operations_Expressions/typecast.html
new file mode 100644
index 000000000..a010e7065
--- /dev/null
+++ b/PABCNetHelp/LangGuide/Operations_Expressions/typecast.html
@@ -0,0 +1,52 @@
+
+
+
+
++
+++
()
. + + , , +, . + + .
+.
++++
type
+ pinteger = ^integer;
+ Season = (Winter,Spring,Summer,Autumn);
+ var i: integer;
+ b: byte;
+ p: pointer := @i;
+ s: Season;
+ begin
+ i := integer('z');
+ b := byte(i);
+ i := pinteger(p);
+ s := Season(1);
+ end.
Object .
+.
+++ + + diff --git a/PABCNetHelp/LangGuide/Operations_Expressions/typeof_sizeof.html b/PABCNetHelp/LangGuide/Operations_Expressions/typeof_sizeof.html new file mode 100644 index 000000000..7733bd14d --- /dev/null +++ b/PABCNetHelp/LangGuide/Operations_Expressions/typeof_sizeof.html @@ -0,0 +1,26 @@ + + + ++
var i: integer := 5;
+ begin
var o: Object := Object(i);
+ end.
sizeof( )
+ .
typeof(
+)
+ System.Type.
+ typeof:
++ + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operators/assign.html b/PABCNetHelp/LangGuide/Operators/assign.html new file mode 100644 index 000000000..e5082b3ca --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/assign.html @@ -0,0 +1,64 @@ + + + + + ++
type
+ Base = class ... end;
+ Derived = class(Base) ... end;+
var b: Base := new Derived;+
begin
+ writeln(b.GetType = typeof(Derived));
+ end.
+++
:=
,
+, .
+ := .
+ .
+.
+:
++++
i := i + 1; // i 1
PascalABC.NET
+
++=, -=,
+*=, /=.
+
+. ,
+ += *=
+
++=, -=
+*= -
+.
+ .
++=, -=,
+*=, /=
+ : a #= b
+a := a # b, # -
+
++, -,
+*, /.
:
++++
a += 3; // a 3
+ b *= 2; // b 2
/= ,
+ - .
++=, -=,
+*=, /=
+
+ .
+++
op
op -
++=, -=,
+*=, /=.
, +, , + .
+
+ : a #= b
+a := a # b, # -
+
++, -,
+*, /.
+. :
++++
a += 3; // a := a + 3; - a 3
+ b *= 2; // b := b * 2; - b 2
/=
+ - .
++ PascalABC.NET + . ( + , +; PascalABC.NET + , + ).+
begin
+
+ end
";".
+ begin
+end, ,
+ .
+
:
+++ ++
s := 0;
p := 1;
+ for var i:=1 to 10 do
+ begin
+ p := p * i;
+ s := s + p
+ end
, +:
+
+ begin
+
+ var a,b: integer;
+ var r: real;
+ readln(a,b);
+ x := a/b;
+ writeln(x);
+ end.
+
+
+
diff --git a/PABCNetHelp/LangGuide/Operators/break.html b/PABCNetHelp/LangGuide/Operators/break.html
new file mode 100644
index 000000000..961143e72
--- /dev/null
+++ b/PABCNetHelp/LangGuide/Operators/break.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+ break continue
+ .
break
+.
+ , . continue ,
+ . :
+++
flag := False;
+ for var i:=1 to 10 do
+ begin
+ read(x);
+ if x<0 then continue; // +
+ if x=5 then
+ begin
+ flag := True;
+ break; //
+ end;
+ end;
break continue
+ .
exit
+ .
+++
function Analyze(x: integer): boolean;
+ begin
+ if x<0 then
+ begin
+ Result := False;
+ exit
+ end;
+ ...
+ end;
exit
+ .
,
+PascalABC.NET ( Borland Pascal
+Borland Delphi) break, continue
+ exit , .
+ , . + :
+++ ++
case+ of
+1:+ 1;
+ ...
+N: +N;
+ else0
+end;
case .
+ , ,
+ .
+ , else ,
+ else , case
+ .
,
+ a..b ( a
+b);
+. :
+++
case Country of
+ '': Capital := '';
+ '': Capital := '';
+ '': Capital := '';
else Capital + := ' ';
end;+
case DayOfWeek of
+ 1..5: writeln(' ');
+ 6,7: writeln(' ');
+ end;
. ,
++++
case i of
+ 2,5: write(1);
+ 4..6: write(2);
+ end;
.
++ + + diff --git a/PABCNetHelp/LangGuide/Operators/emptyop.html b/PABCNetHelp/LangGuide/Operators/emptyop.html new file mode 100644 index 000000000..76a47a038 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/emptyop.html @@ -0,0 +1,40 @@ + + + + + +
1. + ";" +:
+++ ";" + , , +";" . , ";" + end , . ++
begina := 1;
+
+ b := a;
+ end
2. , :
+++ + + diff --git a/PABCNetHelp/LangGuide/Operators/for.html b/PABCNetHelp/LangGuide/Operators/for.html new file mode 100644 index 000000000..e22d61ec9 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/for.html @@ -0,0 +1,110 @@ + + + + + ++
label a;
+ begin
+ goto a;
+ x := 1;
+ a:
+ end
for
+:
++ ++
for:=++to+do
+
+++
for:= ++downto+do
+
, + :
+++ ++
for::=+to+ downto+do
+
+++
for var:= ++to+ downto+do
+
+ . + , + . , + :
++++
for var i := 1 to 10 do
+ Print(i);
+ for var i := 1 to 5 do
+ Print(i*i);
for do
+ ,
+ do - .
+ for
+ .
+ to
+
+ , ,
+ downto -
+ . -
+ .
+ . .
- . + + - .
+:
++++
var en: (red,green,blue,white);
+ ...
+ for en := red to blue do
+ write(Ord(en):2);
+ for var c := 'a' to 'z' do
+ write(c);
for ... to
+
+ for ...
+downto
+ , .
, +- . + PascalABC.NET .
+ -
+ . ,
+for :
+++
for i := 1 to 10 do
+ i -= 1;
+ + + diff --git a/PABCNetHelp/LangGuide/Operators/foreach.html b/PABCNetHelp/LangGuide/Operators/foreach.html new file mode 100644 index 000000000..48519bb52 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/foreach.html @@ -0,0 +1,78 @@ + + + + + +
foreach
+:
++ ++
foreach+ indo
+
++ ++
foreach:+in+ do
+
+++
foreach varin+ do
+
,
+, , ,
+IEnumerable
+IEnumerable<T>(, List<T>,
+Dictionary<Key,Value> ..).
+ ,
+(
+IEnumerable, object).
+foreach
+.
+ + . + , .. +.
+:
++++
var
+ ss: set of string := ['','',''];
+ a: array of integer := (3,4,5);
+ b: array [1..5] of integer := (1,3,5,7,9);
+ l := new List<real>;
+ begin
+ + foreach s: string in ss do
+ write(s,' ');
+ writeln;
+ + foreach x: integer in a do
+ write(x,' ');
+ writeln;
+ + foreach var x in b do
+ write(x,' ');
+ writeln;
+ + foreach var r in l do
+ write(r,' ');
+ end.
+
+ + + diff --git a/PABCNetHelp/LangGuide/Operators/goto.html b/PABCNetHelp/LangGuide/Operators/goto.html new file mode 100644 index 000000000..650ae331e --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/goto.html @@ -0,0 +1,77 @@ + + + + + +
goto :+++
goto+
,
+.
. + , +:
++++
label1:+
+label:
+++
label 1,2,3;
,
+++
label 1,2;
+begin
+ var i := 5;
+2: if i<0 then goto 1;
+ write(i);
+ Dec(i);
+ goto 2;
+1:
+end.
543210.
, . + .
+, + . , .
+
+ .
+goto
+: break
+- , , exit - ,
+continue
+- .
goto - .
+, k
+ :
+++
var a: array [1..10,1..10] of integer;
+ ...
+ var found := False;
+ for var i:=1 to 10 do
+ for var j:=1 to 10 do
+ if a[i,j]=k then
+ begin
+ found := True;
+ goto + c1;
+ end;
+ c1: writeln(found);
+ + + + diff --git a/PABCNetHelp/LangGuide/Operators/if.html b/PABCNetHelp/LangGuide/Operators/if.html new file mode 100644 index 000000000..85ee0ad6b --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/if.html @@ -0,0 +1,68 @@ + + + + + +
. +
++:
+++ . +,+
ifthen+ 1
+else2
1,
+ 2.+ :
++++
ifthen+
,
+,
+.
+
+++
if1+then
+ if2+then1
+else+ 2
else
+ if, else
+ . ,
+else
+if,
+ :
+++
if1+then
+ begin
+ if2+then1
+end
+else2
:
+++ + + diff --git a/PABCNetHelp/LangGuide/Operators/index_statements.html b/PABCNetHelp/LangGuide/Operators/index_statements.html new file mode 100644 index 000000000..c49efc590 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/index_statements.html @@ -0,0 +1,49 @@ + + + + ++
if a<b then
+ min := a
+ else min := b;
В PascalABC.NET определены следующие операторы.
++++
lockdo
+
.
+ lock ,
+ . ,
+, lock,
+ .
+, , -
+. ,
+ .
+++
lock obj do
+ oper;
:
+++ + + + diff --git a/PABCNetHelp/LangGuide/Operators/loop.html b/PABCNetHelp/LangGuide/Operators/loop.html new file mode 100644 index 000000000..8e67d033c --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/loop.html @@ -0,0 +1,31 @@ + + + + + ++
Monitor.Enter(obj);
+ try
+ oper;
+ finally
+ Monitor.Exit(obj);
+ end;
loop :
+++
loopdo
+
+. <= 0 , .
+ loop ,
+ :
++ + + diff --git a/PABCNetHelp/LangGuide/Operators/plusequal.html b/PABCNetHelp/LangGuide/Operators/plusequal.html new file mode 100644 index 000000000..98374b253 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/plusequal.html @@ -0,0 +1,64 @@ + + + + + + ++
loop 5 do
Print(1);
+ var x := 1;
loop 5 do
+ begin
Print(x);
x += 2;
end;
+=
+ , -=
+- . .
+:
+++
procedure mult2(var r: real);
begin
r := 2 * r;
+ end;+
procedure add3(var r: real);
begin
r := r + 3;
+ end;+
var
+ p: procedure (var x: real);
+ r: real;+
begin
+ r := 1;
+ p := mult2;
+ p += add3;
+ p(r); // r := 2 * r; r := r + 3;
+ p -= mult2;
+ p(r); // r := r + 3;
+ end.
+ .
+ + +=
+-=
+/ .NET.
+:
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operators/proccall.html b/PABCNetHelp/LangGuide/Operators/proccall.html new file mode 100644 index 000000000..07e8bc12c --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/proccall.html @@ -0,0 +1,32 @@ + + + + ++
procedure OnTimer1(sender: object; e: + System.Timers.ElapsedEventArgs);
+ begin
+ write(1);
+ end;+
begin
+ var Timer1 := new + System.Timers.Timer(1000);
+ Timer1.Elapsed += + OnTimer1;
+ Timer1.Start;
+ while True do
+ Sleep(1000);
+ end.
++ ++
+++
(+)
+ , + ( + +). +, , + , , + , + .
++, .
+ + + diff --git a/PABCNetHelp/LangGuide/Operators/raise.html b/PABCNetHelp/LangGuide/Operators/raise.html new file mode 100644 index 000000000..d095db42d --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/raise.html @@ -0,0 +1,36 @@ + + + + + + raise
+ :
+++
raise
+- , Exception.
+:
++ + ++
raise new Exception('');
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operators/repeat.html b/PABCNetHelp/LangGuide/Operators/repeat.html new file mode 100644 index 000000000..164c242fc --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/repeat.html @@ -0,0 +1,42 @@ + + + + + ++
raise;
+
repeat :+++
repeat
+
+until
while,
+ , , .
+ , , repeat,
+ .
repeat , + , . :
++++
repeat
+ read(x);
+ until x=0;
, +:
++++
repeat
+ write(1);
+ until 2=1;
+ + + diff --git a/PABCNetHelp/LangGuide/Operators/try_except.html b/PABCNetHelp/LangGuide/Operators/try_except.html new file mode 100644 index 000000000..dc25f6d23 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/try_except.html @@ -0,0 +1,97 @@ + + + + + +
try ... except :
+++
try
+
+except
+
+end;
try
+ .
+ ,
+ except.
+ except,
+ , try ...
+except ... end.
+ try,
+ except.
+ try ,
+ . , try
+ , except
+ .
(
+except) ,
+ except ,
+
+ try. ,
+ .
+ +, , +
++++
on:do
';',
+ ';'.
+ -
+( Exception),
+ - (
+).
+ except.
+ (
+ ),
+, ,
+
+ try.
+ on else,
+ ,
+.
, + , .. +.
+
+: ,
+ .
+ , - (
+ ).
+ Exception
+ .
.
++++
var a: array [1..10] of integer;
+ try
+ var i: integer;
+ readln(i);
+ writeln(a[i] div i);
+ ...
+ except
+ on System.DivideByZeroException do
+ writeln(' 0');
+ on e: System.IndexOutOfRangeException do
+ writeln(e.Message);
+ on System.FormatException do
+ writeln(' ');
+ else writeln('- + ');
+ end;
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operators/try_finally.html b/PABCNetHelp/LangGuide/Operators/try_finally.html new file mode 100644 index 000000000..d33fbf395 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/try_finally.html @@ -0,0 +1,56 @@ + + + + + +
try ... finally :
+++
try
+
+finally
+
+end;
finally
+ ,
+ try.
+ .
finally
+ .
1. .
++++
reset(f);
+ try
+ ...
+finally
+close(f);+
+end;
,
+ try.
2. .
++++
New(p);
+ try
+ ...
+finally
+Dispose(p);
+end;
, p,
+ ,
+try.
PascalABC.NET + begin-end + . .
+:
+++ +var:+;
++ +var:+:=;+
++ +var:+=;+// Delphi+
++var:=+;+
. :
+
+begin
+ var a1,a2,a3: integer;
var n: real := 5;
+ var s := ' ';
+ ...
+ end.
+
++ . + . :
+
+begin
+ var l := new List<integer>;
var a :=
+ Seq(1,3,5); // a Seq: array of
+ integer
+ end.
+
+( ) :
+ +
+ var t := (1,2);
(var a, var b) := (1,2);
+
+
+
+ var (a,b) := (1,2);
++:
+++function SP(a,b: real) := (a*b,2*(a+b));
+ ...
+var (S,P) := SP(2,3);+
+-:
+
+ // var f := x -> x*x; // !
var
+ f : Func<integer,integer> := x -> x*x;
+
++ . , + +. .
+ + + diff --git a/PABCNetHelp/LangGuide/Operators/while.html b/PABCNetHelp/LangGuide/Operators/while.html new file mode 100644 index 000000000..9f1959d10 --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/while.html @@ -0,0 +1,62 @@ + + + + + +while :+++
whiledo
+
+ , do
+ .
+ , , ,
+ .
, +:
+++ ++
while 2>1 do
+ write(1);
repeat :
+
+++
repeat
+
+until
while,
+ , , .
+ , , repeat,
+ .
repeat , + , . :
++++
repeat
+ read(x);
+ until x=0;
, +:
+++ + + + diff --git a/PABCNetHelp/LangGuide/Operators/with.html b/PABCNetHelp/LangGuide/Operators/with.html new file mode 100644 index 000000000..03f9e512b --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/with.html @@ -0,0 +1,96 @@ + + + + + + ++
repeat
+ write(1);
+ until 2=1;
with
+ , , . :+++
with+do+
+++
withdo+
+ , + . , +
++++
var
+ DateOfBirthday = record
+ Day: Integer;
+ Month: Integer;
+ Year: Integer;
+ end;
+ with :
+++
DateOfBirthday.Day := 23;
+ DateOfBirthday.Month := 2;
+ DateOfBirthday.Year := 1965;
with
+ :
+++
with DateOfBirthday do
+ begin
+ Day := 23;
+ Month := 2;
+ Year := 1965;
+ end;
, (, ),
+ (, ).
+with
+ with,
+ with ..
+with ,
+ . ,
++
var
+ x,y,z: integer;
+ a: record
+ x,y: integer;
+ end;
+ b: record
+ x: integer;
+ end;
+
with a,b do
+ begin
+ x := 1;
+ y := 2;
+ z := 3;
+ end;
++
with a do
+ with b do
+ begin
+ x := 1;
+ y := 2;
+ z := 3;
+ end;
++
++
b.x:=1;
+ a.y:=2;
+ z:=3;
with .
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Operators/yield.html b/PABCNetHelp/LangGuide/Operators/yield.html new file mode 100644 index 000000000..0bc675fed --- /dev/null +++ b/PABCNetHelp/LangGuide/Operators/yield.html @@ -0,0 +1,81 @@ + + + + + +yield , , + :
++++
yield
, yield, . + +yield, , , + yield, .
+:
++++
function Squares(n: integer): sequence + of integer;
begin
for var + i:=1 to n do
yield + i*i
end;
begin
+ var q := Squares(5);
foreach + var x in q do
+ Print(x);
Println;
q.Println;
end.
q +, .. n , + foreach q, + Println q. + yield Squares.
+yield +i*i, + . + , .
+yield . +, yield . :
++++
var a := 2;
function + Squares(n: integer): sequence of integer;
begin
+ for var i:=1 to n do
+ yield i*a
end;
begin
+ var q := Squares(5);
q.Println;
a + := 3;
q.Println;
end.
yield a . + : a + -, + a. + :
++++
+ 2 4 6 8 10
3 6 9 12 15
, yield, :
+yield sequence , , + yield, + :
++++
yield sequence
yield, yield +sequence , + -. +, :
++++
function f: sequence of real;
+ begin
yield sequence + Seq(1,2,3);
yield 4;
end;
+
begin
f.Println;
end.
+
+++
1 2 3 4
+ :
++++
function InfixPrintTree<T>(root: Node<T>): + sequence of T;
begin
if + root = nil then exit;
yield + sequence InfixPrintTree(root.left);
yield + root.data;
yield sequence + InfixPrintTree(root.right);
end;
, yield sequence, +, yield.
+ + + diff --git a/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Common subroutines for files.html b/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Common subroutines for files.html new file mode 100644 index 000000000..8fc8fde67 --- /dev/null +++ b/PABCNetHelp/LangGuide/PABCSystemUnit/Files/Common subroutines for files.html @@ -0,0 +1,25 @@ + + +procedure Assign(f: ; name: string);
+ |
procedure AssignFile(f: ; name: string);
+ |
procedure Close(f: );
+ |
procedure CloseFile(f: );
+ |
function Eof(f: ): boolean;
+True, |
procedure Erase(f: );
+, |
procedure Rename(f: ; newname: string);
+, , newname. |
procedure Dec(var i: integer);
+i 1 |
procedure Dec(var i: integer; n: integer);
+i n |
procedure Dec(var e: );
+1 |
procedure Dec(var e: ; n: integer);
+n |
function Eof: boolean;
+True, |
function Eoln: boolean;
+True, |
procedure Inc(var i: integer);
+i 1 |
procedure Inc(var i: integer; n: integer);
+i n |
procedure Inc(var e: );
+1 |
procedure Inc(var e: ; n: integer);
+n |
function Ord(a: ): ;
+a |
function Ord(a: ): integer;
+a |
function Pred(x: ): ;
+x |
function Pred(x: ): ;
+x |
function Succ(x: ): ;
+x |
function Succ(x: ): ;
+x |
procedure Swap<T>(var a, b: T);
+ |
function Sqrt(Self: BigInteger): real; extensionmethod;
+ |
function Conjugate(Self: Complex): Complex; extensionmethod;
+ |
function Compose<T1, T2, TResult>(Self: T2->TResult; composer: T1->T2): T1->TResult; extensionmethod;
+ |
function Get<Key, Value>(Self: IDictionary<Key, Value>; K: Key): Value; extensionmethod;
+, , , |
function AdjacentFind<T>(Self: IList<T>; start: integer := 0): integer; extensionmethod;
+. , -1 |
function AdjacentFind<T>(Self: IList<T>; eq: (T,T)->boolean; start: integer := 0): integer; extensionmethod;
+, eq, . , -1 |
procedure Fill<T>(Self: IList<T>; f: integer->T); extensionmethod;
+, |
function IndexMax<T>(self: IList<T>; index: integer := 0): integer; extensionmethod;where T: System.IComparable<T>;
+index |
function IndexMin<T>(Self: IList<T>; index: integer := 0): integer; extensionmethod;where T: IComparable<T>;
+index |
function LastIndexMax<T>(Self: IList<T>): integer; extensionmethod;where T: System.IComparable<T>;
+ |
function LastIndexMax<T>(Self: IList<T>; index: integer): integer; extensionmethod;where T: System.IComparable<T>;
+[0,index-1] |
function LastIndexMin<T>(Self: IList<T>): integer; extensionmethod;where T: System.IComparable<T>;
+ |
function LastIndexMin<T>(Self: IList<T>; index: integer): integer; extensionmethod;where T: System.IComparable<T>;
+[0,index-1] |
function RemoveLast<T>(Self: List<T>): List<T>; extensionmethod;
+. , |
procedure Replace<T>(Self: IList<T>; oldValue, newValue: T); extensionmethod;
+ |
function Shuffle<T>(Self: List<T>): List<T>; extensionmethod;
+ |
function Slice<T>(Self: List<T>; from, step: integer): List<T>; extensionmethod;
+from step |
function Slice<T>(Self: List<T>; from, step, count: integer): List<T>; extensionmethod;
+from step count |
procedure Transform<T>(Self: IList<T>; f: T->T); extensionmethod;
+ |
function Col<T>(Self: array [,] of T; k: integer): array of T; extensionmethod;
+k- |
function ColCount<T>(Self: array [,] of T): integer; extensionmethod;
+ |
function Cols<T>(Self: array [,] of T): sequence of sequence of T; extensionmethod;
+ |
function ColSeq<T>(Self: array [,] of T; k: integer): sequence of T; extensionmethod;
+k- |
function ConvertAll<T, T1>(Self: array [,] of T; converter: T->T1): array [,] of T1; extensionmethod;
+ |
function ElementsByCol<T>(Self: array [,] of T): sequence of T; extensionmethod;
+ |
function ElementsByRow<T>(Self: array [,] of T): sequence of T; extensionmethod;
+ |
function ElementsWithIndexes<T>(Self: array [,] of T): sequence of (T, integer, integer); extensionmethod;
+(a[i,j],i,j) |
procedure Fill<T>(Self: array [,] of T; f: (integer,integer) ->T); extensionmethod;
+, |
function Print<T>(Self: array [,] of T; w: integer := 4): array [,] of T; extensionmethod;
+, w - |
function Print(Self: array [,] of real; w: integer := 7; f: integer := 2): array [,] of real; extensionmethod;
+:w:f |
function Println<T>(Self: array [,] of T; w: integer := 4): array [,] of T; extensionmethod;
+, w - |
function Println(Self: array [,] of real; w: integer := 7; f: integer := 2): array [,] of real; extensionmethod;
+:w:f |
function Row<T>(Self: array [,] of T; k: integer): array of T; extensionmethod;
+k- |
function RowCount<T>(Self: array [,] of T): integer; extensionmethod;
+ |
function Rows<T>(Self: array [,] of T): sequence of sequence of T; extensionmethod;
+ |
function RowSeq<T>(Self: array [,] of T; k: integer): sequence of T; extensionmethod;
+k- |
procedure SetCol<T>(Self: array [,] of T; k: integer; a: array of T); extensionmethod;
+k |
procedure SetCol<T>(Self: array [,] of T; k: integer; a: sequence of T); extensionmethod := Self.SetCol(k,a.ToArray);
+k |
procedure SetRow<T>(Self: array [,] of T; k: integer; a: array of T); extensionmethod;
+k |
procedure SetRow<T>(Self: array [,] of T; k: integer; a: sequence of T); extensionmethod := Self.SetRow(k,a.ToArray);
+k |
procedure SwapCols<T>(Self: array [,] of T; k1, k2: integer); extensionmethod;
+k1 k2 |
procedure SwapRows<T>(Self: array [,] of T; k1, k2: integer); extensionmethod;
+k1 k2 |
procedure Transform<T>(Self: array [,] of T; f: T->T); extensionmethod;
+ |
function AdjacentFind<T>(Self: array of T; start: integer := 0): integer; extensionmethod;
+/ . , -1 |
function AdjacentFind<T>(Self: array of T; eq: (T,T)->boolean; start: integer := 0): integer; extensionmethod;
+, eq, . , -1 |
function BinarySearch<T>(self: array of T; x: T): integer; extensionmethod;
+ |
function ConvertAll<T, T1>(self: array of T; converter: T->T1): array of T1; extensionmethod;
+ |
procedure Fill<T>(Self: array of T; f: integer -> T); extensionmethod;
+, |
function Find<T>(self: array of T; p: T->boolean): T; extensionmethod;
+, . , |
function FindAll<T>(self: array of T; p: T->boolean): array of T; extensionmethod;
+, |
function FindIndex<T>(self: array of T; p: T->boolean): integer; extensionmethod;
+, . , -1 |
function FindIndex<T>(self: array of T; start: integer; p: T->boolean): integer; extensionmethod;
+, , start. , -1 |
function FindLast<T>(self: array of T; p: T->boolean): T; extensionmethod;
+, . , |
function FindLastIndex<T>(self: array of T; p: T->boolean): integer; extensionmethod;
+, . , |
function FindLastIndex<T>(self: array of T; start: integer; p: T->boolean): integer; extensionmethod;
+, , start. , |
function High(self: System.Array); extensionmethod := High(Self);
+ |
function Indexes<T>(Self: array of T): sequence of integer; extensionmethod := Range(0, Self.Length - 1);
+ |
function IndexesOf<T>(Self: array of T; cond: T->boolean): sequence of integer; extensionmethod;
+, |
function IndexesOf<T>(Self: array of T; cond: (T,integer) ->boolean): sequence of integer; extensionmethod;
+, |
function IndexMax<T>(self: array of T; index: integer := 0): integer; extensionmethod; where T: System.IComparable<T>;
+index |
function IndexMin<T>(Self: array of T; index: integer := 0): integer; extensionmethod; where T: System.IComparable<T>;
+/ index |
function IndexOf<T>(self: array of T; x: T): integer; extensionmethod;
+-1 |
function IndexOf<T>(self: array of T; x: T; start: integer): integer; extensionmethod;
+start -1 |
function LastIndexMax<T>(Self: array of T): integer; extensionmethod; where T: System.IComparable<T>;
+ |
function LastIndexMax<T>(Self: array of T; index: integer): integer; extensionmethod; where T: System.IComparable<T>;
+[0,index] |
function LastIndexMin<T>(Self: array of T): integer; extensionmethod; where T: System.IComparable<T>;
+ |
function LastIndexMin<T>(Self: array of T; index: integer): integer; extensionmethod; where T: System.IComparable<T>;
+[0,index] |
function LastIndexOf<T>(self: array of T; x: T): integer; extensionmethod;
+-1 |
function LastIndexOf<T>(self: array of T; x: T; start: integer): integer; extensionmethod;
+start -1 |
function Low(self: System.Array); extensionmethod := Low(Self);
+ |
function Max<T>(Self: array of T): T; extensionmethod;where T: System.IComparable<T>;
+ |
function Max(Self: array of integer): integer; extensionmethod;
+ |
function Max(Self: array of real): real; extensionmethod;
+ |
function Min<T>(Self: array of T): T; extensionmethod;where T: System.IComparable<T>;
+ |
function Min(Self: array of integer): integer; extensionmethod;
+ |
function Min(Self: array of real): real; extensionmethod;
+ |
procedure Replace<T>(Self: array of T; oldValue,newValue: T); extensionmethod;
+ |
function Shuffle<T>(Self: array of T): array of T; extensionmethod;
+ |
function Slice<T>(Self: array of T; from, step: integer): array of T; extensionmethod;
+from step |
function Slice<T>(Self: array of T; from, step, count: integer): array of T; extensionmethod;
+from step count |
procedure Sort<T>(self: array of T); extensionmethod;
+ |
procedure Sort<T>(self: array of T; cmp: (T,T) ->integer); extensionmethod;
+, cmp |
procedure Transform<T>(self: array of T; f: T -> T); extensionmethod;
+ |
function Between(Self: char; a, b: char): boolean; extensionmethod;
+True |
function Code(Self: char): integer; extensionmethod := word(Self);
+Unicode |
function InRange(Self: char; a,b: char): boolean; extensionmethod;
+True |
function IsDigit(Self: char); extensionmethod := char.IsDigit(Self);
+ |
function IsLetter(Self: char): boolean; extensionmethod;
+ |
function IsLower(Self: char): boolean; extensionmethod;
+ |
function IsUpper(Self: char): boolean; extensionmethod;
+ |
function Pred(Self: char); extensionmethod := PABCSystem.Pred(Self);
+ |
function Succ(Self: char); extensionmethod := PABCSystem.Succ(Self);
+ |
function ToDigit(Self: char): integer; extensionmethod;
+ |
function ToLower(Self: char): char; extensionmethod;
+ |
function ToUpper(Self: char): char; extensionmethod;
+ |
function Between(Self: integer; a, b: integer): boolean; extensionmethod;
+True |
function Downto(Self: integer; n: integer): sequence of integer; extensionmethod;
+n |
function InRange(Self: integer; a,b: integer): boolean; extensionmethod;
+True |
function IsEven(Self: integer): boolean; extensionmethod;
+, |
function IsOdd(Self: integer): boolean; extensionmethod;
+, |
function Range(Self: integer): sequence of integer; extensionmethod;
+1 |
function Sqr(Self: integer): integer; extensionmethod;
+ |
function Sqrt(Self: integer): real; extensionmethod;
+ |
function Times(Self: integer): sequence of integer; extensionmethod;
+0,1,...n-1 |
function To(Self: integer; n: integer): sequence of integer; extensionmethod;
+n |
function Between(Self: real; a, b: real): boolean; extensionmethod;
+True |
function InRange(Self: real; a,b: real): boolean; extensionmethod;
+True |
function Round(Self: real): integer; extensionmethod;
+, |
function Round(Self: real; digits: integer): real; extensionmethod;
+x, digits |
function RoundBigInteger(Self: real): BigInteger; extensionmethod;
+, |
function Sqr(Self: real): real; extensionmethod;
+ |
function Sqrt(Self: real): real; extensionmethod;
+ |
function ToString(Self: real; frac: integer): string; extensionmethod;
+, frac |
function Trunc(Self: real): integer; extensionmethod;
+ |
function TruncBigInteger(Self: real): BigInteger; extensionmethod;
+ |
function AdjacentGroup<T>(Self: sequence of T): sequence of array of T; extensionmethod;
+, |
function Batch<T>(Self: sequence of T; size: integer): sequence of sequence of T; extensionmethod;
+size |
function Batch<T, Res>(Self: sequence of T; size: integer; proj: Func<IEnumerable<T>, Res>): sequence of Res; extensionmethod;
+size |
function Cartesian<T, T1>(Self: sequence of T; b: sequence of T1): sequence of (T, T1); extensionmethod;
+ |
function Cartesian<T, T1, T2>(Self: sequence of T; b: sequence of T1; func: (T,T1)->T2): sequence of T2; extensionmethod;
+ |
procedure ForEach<T>(Self: sequence of T; action: T -> ()); extensionmethod;
+ |
procedure ForEach<T>(Self: sequence of T; action: (T,integer) -> ()); extensionmethod;
+, |
function Incremental(Self: sequence of integer): sequence of integer; extensionmethod;
+ |
function Incremental(Self: array of integer): sequence of integer; extensionmethod;
+ |
function Incremental(Self: List<integer>): sequence of integer; extensionmethod;
+ |
function Incremental(Self: LinkedList<integer>): sequence of integer; extensionmethod;
+ |
function Incremental(Self: sequence of real): sequence of real; extensionmethod;
+ |
function Incremental(Self: array of real): sequence of real; extensionmethod;
+ |
function Incremental(Self: List<real>): sequence of real; extensionmethod;
+ |
function Incremental(Self: LinkedList<real>): sequence of real; extensionmethod;
+ |
function Incremental<T, T1>(Self: sequence of T; func: (T,T)->T1): sequence of T1; extensionmethod;
+. func |
function Incremental<T, T1>(Self: sequence of T; func: (T,T,integer)->T1): sequence of T1; extensionmethod;
+. func |
function Interleave<T>(Self: sequence of T; a: sequence of T): sequence of T; extensionmethod;
+ |
function Interleave<T>(Self: sequence of T; a, b: sequence of T): sequence of T; extensionmethod;
+ |
function Interleave<T>(Self: sequence of T; a, b, c: sequence of T): sequence of T; extensionmethod;
+ |
function JoinIntoString<T>(Self: sequence of T; delim: string): string; extensionmethod;
+, , delim |
function JoinIntoString<T>(Self: sequence of T): string; extensionmethod;
+, , |
function LastMaxBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensionmethod;
+ |
function LastMinBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensionmethod;
+ |
function MaxBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensionmethod;
+ |
function MinBy<T, TKey>(Self: sequence of T; selector: T->TKey): T; extensionmethod;
+ |
function Numerate<T>(Self: sequence of T): sequence of (integer, T); extensionmethod;
+ |
function Numerate<T>(Self: sequence of T; from: integer): sequence of (integer, T); extensionmethod;
+from |
function Order<T>(Self: sequence of T): sequence of T; extensionmethod;
+ |
function OrderDescending<T>(Self: sequence of T): sequence of T; extensionmethod;
+ |
function Pairwise<T>(Self: sequence of T): sequence of (T, T); extensionmethod;
+ |
function Pairwise<T, Res>(Self: sequence of T; func: (T,T)->Res): sequence of Res; extensionmethod;
+, func |
function Partition<T>(Self: sequence of T; cond: T->boolean): (sequence of T, sequence of T); extensionmethod;
+ |
function Partition<T>(Self: sequence of T; cond: (T,integer)->boolean): (sequence of T, sequence of T); extensionmethod;
+, |
function Print<T>(Self: sequence of T; delim: string): sequence of T; extensionmethod;
+, delim |
function Print<T>(Self: sequence of T): sequence of T; extensionmethod;
+, |
function PrintLines<T>(Self: sequence of T): sequence of T; extensionmethod;
+, |
function PrintLines<T,T1>(Self: sequence of T; map: T->T1): sequence of T; extensionmethod;
+, map |
function Println<T>(Self: sequence of T; delim: string): sequence of T; extensionmethod;
+, delim , |
function Println<T>(Self: sequence of T): sequence of T; extensionmethod;
+, , |
function SkipLast<T>(self: sequence of T; count: integer := 1): sequence of T; extensionmethod;
+count |
function Slice<T>(Self: sequence of T; from, step: integer): sequence of T; extensionmethod;
+from step > 0 |
function Slice<T>(Self: sequence of T; from, step, count: integer): sequence of T; extensionmethod;
+from step > 0 count |
function Sorted<T>(Self: sequence of T): sequence of T; extensionmethod;
+ |
function SortedDescending<T>(Self: sequence of T): sequence of T; extensionmethod;
+ |
function SplitAt<T>(Self: sequence of T; ind: integer): (sequence of T, sequence of T); extensionmethod;
+ind |
function Tabulate<T, T1>(Self: sequence of T; F: T->T1): sequence of (T, T1); extensionmethod;
+ |
function TakeLast<T>(Self: sequence of T; count: integer): sequence of T; extensionmethod;
+count |
function ToHashSet<T>(Self: sequence of T): HashSet<T>; extensionmethod;
+HashSet |
function ToLinkedList<T>(Self: sequence of T): LinkedList<T>; extensionmethod;
+LinkedList |
function ToSortedSet<T>(Self: sequence of T): SortedSet<T>; extensionmethod;
+SortedSet |
function UnZipTuple<T, T1>(Self: sequence of (T, T1)): (sequence of T, sequence of T1); extensionmethod;
+ |
function UnZipTuple<T, T1, T2>(Self: sequence of (T, T1, T2)): (sequence of T, sequence of T1, sequence of T2); extensionmethod;
+ |
function UnZipTuple<T, T1, T2, T3>(Self: sequence of (T, T1, T2, T3)): (sequence of T, sequence of T1, sequence of T2, sequence of T3); extensionmethod;
+ |
function WriteLines(Self: sequence of string; fname: string): sequence of string; extensionmethod;
+ |
function ZipTuple<T, T1>(Self: sequence of T; a: sequence of T1): sequence of (T, T1); extensionmethod;
+ |
function ZipTuple<T, T1, T2>(Self: sequence of T; a: sequence of T1; b: sequence of T2): sequence of (T, T1, T2); extensionmethod;
+ |
function ZipTuple<T, T1, T2, T3>(Self: sequence of T; a: sequence of T1; b: sequence of T2; c: sequence of T3): sequence of (T, T1, T2, T3); extensionmethod;
+ |
function Between(Self: string; a, b: string): boolean; extensionmethod;
+True |
function InRange(Self: string; a,b: string): boolean; extensionmethod;
+True |
function Inverse(Self: string): string; extensionmethod;
+ |
function IsMatch(Self: string; reg: string; options: RegexOptions := RegexOptions.None): boolean; extensionmethod := Regex.IsMatch(Self, reg, options);
+ |
function Left(Self: string; length: integer): string; extensionmethod;
+, length |
function Matches(Self: string; reg: string; options: RegexOptions := RegexOptions.None): sequence of Match; extensionmethod;
+Match |
function MatchValue(Self: string; reg: string; options: RegexOptions := RegexOptions.None): string; extensionmethod;
+ |
function MatchValues(Self: string; reg: string; options: RegexOptions := RegexOptions.None): sequence of string; extensionmethod;
+ |
function ReadInteger(Self: string; var from: integer): integer; extensionmethod;
+from from |
function ReadReal(Self: string; var from: integer): real; extensionmethod;
+from from |
function ReadWord(Self: string; var from: integer): string; extensionmethod;
+from from |
function RegexReplace(Self: string; reg, repl: string; options: RegexOptions := RegexOptions.None): string; extensionmethod;
+ |
function RegexReplace(Self: string; reg: string; repl: Match->string; options: RegexOptions := RegexOptions.None): string; extensionmethod;
+ |
function Remove(Self: string; params targets: array of string): string; extensionmethod;
+ |
function Right(Self: string; length: integer): string; extensionmethod;
+, length |
function Slice(Self: string; from, step: integer): string; extensionmethod;
+from step |
function Slice(Self: string; from, step, count: integer): string; extensionmethod;
+from step count |
function ToBigInteger(Self: string): BigInteger; extensionmethod;
+BigInteger |
function ToInteger(Self: string): integer; extensionmethod;
+ |
function ToIntegers(Self: string): array of integer; extensionmethod;
+ |
function ToReal(Self: string): real; extensionmethod;
+ |
function ToReals(Self: string): array of real; extensionmethod;
+ |
function ToWords(Self: string; params delim: array of char): array of string; extensionmethod;
+ |
function Read<T>(Self: file of T): T; extensionmethod;
+ |
function Read2<T>(Self: file of T): (T,T); extensionmethod;
+ |
function Read3<T>(Self: file of T): (T,T,T); extensionmethod;
+ |
function ReadElements<T>(Self: file of T): sequence of T; extensionmethod;
+ |
function ReadElements<T>(fname: string): sequence of T;
+, |
function Seek<T>(Self: file of T; n: int64): file of T; extensionmethod;
+n |
procedure Write<T>(Self: file of T; params vals: array of T); extensionmethod;
+ |
function Abs(c: Complex): Complex;
+ |
function Conjugate(c: Complex): Complex;
+ |
function Cos(c: Complex): Complex;
+ |
function Cplx(re, im: real): Complex;
+re im |
function CplxFromPolar(magnitude, phase: real): Complex;
+ |
function Exp(c: Complex): Complex;
+ |
function Ln(c: Complex): Complex;
+ |
function Log(c: Complex): Complex;
+ |
function Log10(c: Complex): Complex;
+ |
function Power(c, power: Complex): Complex;
+ |
function Sin(c: Complex): Complex;
+ |
function Sqrt(c: Complex): Complex;
+ |
function ExpandFileName(fname: string): string;
+fname |
function ExtractFileDir(fname: string): string;
+fname |
function ExtractFileDrive(fname: string): string;
+fname |
function ExtractFileExt(fname: string): string;
+fname |
function ExtractFileName(fname: string): string;
+fname |
function ExtractFilePath(fname: string): string;
+fname |
function Cycle<T>(Self: sequence of T): sequence of T; extensionmethod;
+ |
function Step(Self: integer): sequence of integer; extensionmethod;
+1 |
function Step(Self: integer; step: integer): sequence of integer; extensionmethod;
+step |
function Step(Self: real; step: real): sequence of real; extensionmethod;
+step |
function Abs(x: ): ;
+x |
function ArcCos(x: real): real;
+x |
function ArcSin(x: real): real;
+x |
function ArcTan(x: real): real;
+x |
function Ceil(x: real): integer;
+>= x |
function Cos(x: real): real;
+x |
function Cosh(x: real): real;
+x |
function DegToRad(x: real): real;
+ |
function Exp(x: real): real;
+x |
function Floor(x: real): integer;
+<= x |
function Frac(x: real): real;
+x |
function Int(x: real): real;
+x |
function Ln(x: real): real;
+x |
function Log(x: real): real;
+x |
function Log10(x: real): real;
+x |
function Log2(x: real): real;
+x 2 |
function LogN(base, x: real): real;
+x base |
function Max(a: , b: ): ;
+a,b |
function Min(a: , b: ): ;
+a,b |
function Odd(i: ): boolean;
+True, i , False |
function Power(x, y: real): real;
+x y |
function Power(x: real; n: integer): real;
+x n |
function Power(x: BigInteger; y: integer): BigInteger;
+x y |
function RadToDeg(x: real): real;
+ |
function Random(maxValue: integer): integer;
+0 maxValue-1 |
function Random(a, b: integer): integer;
+a b |
function Random: real;
+[0..1) |
function Random2(maxValue: integer): (integer, integer);
+0 maxValue-1 |
function Random2(a, b: integer): (integer, integer);
+a b |
function Random2: (real, real);
+[0..1) |
function Random3(maxValue: integer): (integer, integer, integer);
+0 maxValue-1 |
function Random3(a, b: integer): (integer, integer, integer);
+a b |
function Random3: (real, real, real);
+[0..1) |
procedure Randomize(seed: integer);
+, seed. seed |
procedure Randomize;
+ |
function Round(x: real): integer;
+x, . , ( ): Round(2.5)=2, Round(3.5)=4 |
function Round(x: real; digits: integer): real;
+x, digits |
function RoundBigInteger(x: real): BigInteger;
+x, |
function Sign(x: ): ;
+x |
function Sin(x: real): real;
+x |
function Sinh(x: real): real;
+x |
function Sqr(x: ): ;
+x |
function Sqrt(x: real): real;
+x |
function Tan(x: real): real;
+x |
function Tanh(x: real): real;
+x |
function Trunc(x: real): integer;
+x |
function TruncBigInteger(x: real): BigInteger;
+x |
function Print(Self: real): real; extensionmethod;
+ction Print(Self: integer): integer; extensionmethod; |
function Print(Self: boolean): boolean; extensionmethod;
+ction Print(Self: char): char; extensionmethod; |
function Println(Self: integer): integer; extensionmethod;
+ction Print(Self: BigInteger): BigInteger; extensionmethod; |
function Println(Self: char): char; extensionmethod;
+ction Println(Self: real): real; extensionmethod; |
function Println(Self: BigInteger): BigInteger; extensionmethod;
+ction Println(Self: boolean): boolean; extensionmethod; |
procedure Read(a,b,...);
+a,b,... |
procedure Read(f: ; a,b,...);
+a,b,... f |
function ReadBoolean: boolean;
+boolean, |
function ReadBoolean(prompt: string): boolean;
+boolean, |
function ReadBoolean(f: Text): boolean;
+boolean, f |
function ReadChar: char;
+char, |
function ReadChar(prompt: string): char;
+char, |
function ReadChar(f: Text): char;
+char, f |
function ReadChar2: (char, char);
+char, |
function ReadChar2(prompt: string): (char, char);
+char, |
function ReadChar3: (char, char, char);
+char, |
function ReadChar3(prompt: string): (char, char, char);
+char, |
function ReadInteger: integer;
+integer, |
function ReadInteger(prompt: string): integer;
+integer, |
function ReadInteger(f: Text): integer;
+integer, f |
function ReadInteger2: (integer, integer);
+integer, |
function ReadInteger2(prompt: string): (integer, integer);
+integer, |
function ReadInteger3: (integer, integer, integer);
+integer, |
function ReadInteger3(prompt: string): (integer, integer, integer);
+integer, |
procedure Readln(a,b,...);
+a,b,... |
procedure Readln(f: Text; a,b,...);
+a,b,... f |
function ReadlnBoolean: boolean;
+boolean, , |
function ReadlnBoolean(prompt: string): boolean;
+boolean, , |
function ReadlnBoolean(f: Text): boolean;
+boolean, f, |
function ReadlnChar: char;
+char, , |
function ReadlnChar(prompt: string): char;
+char, , |
function ReadlnChar(f: Text): char;
+char, f, |
function ReadlnChar2: (char, char);
+char, , |
function ReadlnChar2(prompt: string): (char, char);
+char, , |
function ReadlnChar3: (char, char, char);
+char, , |
function ReadlnChar3(prompt: string): (char, char, char);
+char, , |
function ReadlnInteger: integer;
+integer, , |
function ReadlnInteger(prompt: string): integer;
+integer, , |
function ReadlnInteger(f: Text): integer;
+integer, f, |
function ReadlnInteger2: (integer, integer);
+integer, , |
function ReadlnInteger2(prompt: string): (integer, integer);
+integer, , |
function ReadlnInteger3: (integer, integer, integer);
+integer, , |
function ReadlnInteger3(prompt: string): (integer, integer, integer);
+integer, , |
function ReadlnReal: real;
+real, , |
function ReadlnReal(prompt: string): real;
+real, , |
function ReadlnReal(f: Text): real;
+real, f, |
function ReadlnReal2: (real, real);
+real, , |
function ReadlnReal2(prompt: string): (real, real);
+real, , |
function ReadlnReal3: (real, real, real);
+real, , |
function ReadlnReal3(prompt: string): (real, real, real);
+real, , |
function ReadlnString: string;
+string, , |
function ReadlnString(prompt: string): string;
+string, , |
function ReadlnString(f: Text): string;
+string, f, |
function ReadlnString2: (string, string);
+string, , |
function ReadlnString2(prompt: string): (string, string);
+string, , |
function ReadlnString3: (string, string, string);
+string, , |
function ReadlnString3(prompt: string): (string, string, string);
+string, , |
function ReadReal: real;
+real, |
function ReadReal(prompt: string): real;
+real, |
function ReadReal(f: Text): real;
+real, f |
function ReadReal2: (real, real);
+real, |
function ReadReal2(prompt: string): (real, real);
+real, |
function ReadReal3: (real, real, real);
+real, |
function ReadReal3(prompt: string): (real, real, real);
+real, |
function ReadString: string;
+string, |
function ReadString(prompt: string): string;
+string, |
function ReadString(f: Text): string;
+string, f |
function ReadString2: (string, string);
+string, |
function ReadString2(prompt: string): (string, string);
+string, |
function ReadString3: (string, string, string);
+string, |
function ReadString3(prompt: string): (string, string, string);
+string, |
function TryRead(var x: integer): boolean;
+x . False |
function Dict<TKey, TVal>(params pairs: array of KeyValuePair<TKey, TVal>): Dictionary<TKey, TVal>;
+(, ) |
function Dict<TKey, TVal>(params pairs: array of (TKey, TVal)): Dictionary<TKey, TVal>;
+(, ) |
function HSet<T>(params a: array of T): HashSet<T>;
+, |
function HSet<T>(a: sequence of T): HashSet<T>;
+, |
function KV<TKey, TVal>(key: TKey; value: TVal): KeyValuePair<TKey, TVal>;
+(, ) |
function LLst<T>(params a: array of T): LinkedList<T>;
+, |
function LLst<T>(a: sequence of T): LinkedList<T>;
+, |
function Lst<T>(params a: array of T): List<T>;
+, |
function Lst<T>(a: sequence of T): List<T>;
+, |
function SSet<T>(params a: array of T): SortedSet<T>;
+, |
function SSet<T>(a: sequence of T): SortedSet<T>;
+, |
E = 2.718281828459045;
+E |
MaxByte = byte.MaxValue;
+byte |
MaxDouble = real.MaxValue;
+double |
MaxInt = integer.MaxValue;
+integer |
MaxInt64 = int64.MaxValue;
+int64 |
MaxLongWord = longword.MaxValue;
+longword |
MaxReal = real.MaxValue;
+real |
MaxShortInt = shortint.MaxValue;
+shortint |
MaxSingle = single.MaxValue;
+single |
MaxSmallInt = smallint.MaxValue;
+smallint |
MaxUInt64 = uint64.MaxValue;
+uint64 |
MaxWord = word.MaxValue;
+word |
MinDouble = real.Epsilon;
+double |
MinReal = real.Epsilon;
+real |
MinSingle = single.Epsilon;
+single |
NewLine = System.Environment.NewLine;
+ |
Pi = 3.141592653589793;
+Pi |
Action<T> = System.Action<T>;
+ |
Action0 = System.Action;
+ |
Action2<T1, T2> = System.Action<T1, T2>;
+ |
Action3<T1, T2, T3> = System.Action<T1, T2, T3>;
+ |
BigInteger = System.Numerics.BigInteger;
+ |
cardinal = System.UInt32;
+cardinal = longword |
Comparer<T> = System.Collections.Generic.Comparer<T>;
+IComparer |
Complex = System.Numerics.Complex;
+ |
DateTime = System.DateTime;
+ |
decimal = System.Decimal;
+128- |
Dictionary<Key, Value> = System.Collections.Generic.Dictionary<Key, Value>;
+( -), - |
double = System.Double;
+double = real |
Encoding = System.Text.Encoding;
+ |
Exception = System.Exception;
+ |
Func<T, Res> = System.Func<T, Res>;
+ |
Func0<Res> = System.Func<Res>;
+ |
Func2<T1, T2, Res> = System.Func<T1, T2, Res>;
+ |
Func3<T1, T2, T3, Res> = System.Func<T1, T2, T3, Res>;
+ |
HashSet<T> = System.Collections.Generic.HashSet<T>;
+, - |
ICollection<T> = System.Collections.Generic.ICollection<T>;
+ |
IComparable<T> = System.IComparable<T>;
+IComparer |
IComparer<T> = System.Collections.Generic.IComparer<T>;
+ |
IDictionary<Key, Value> = System.Collections.Generic.IDictionary<Key, Value>;
+- |
IEnumerable<T> = System.Collections.Generic.IEnumerable<T>;
+, |
IEnumerator<T> = System.Collections.Generic.IEnumerator<T>;
+ |
IEqualityComparer<T> = System.Collections.Generic.IEqualityComparer<T>;
+ |
IList<T> = System.Collections.Generic.IList<T>;
+ |
IntFunc = Func<integer, integer>;
+, |
ISet<T> = System.Collections.Generic.ISet<T>;
+ |
KeyValuePair<Key, Value> = System.Collections.Generic.KeyValuePair<Key, Value>;
+- |
LinkedList<T> = System.Collections.Generic.LinkedList<T>;
+ |
LinkedListNode<T> = System.Collections.Generic.LinkedListNode<T>;
+ |
List<T> = System.Collections.Generic.List<T>;
+ |
longint = System.Int32;
+longint = integer |
Match = System.Text.RegularExpressions.Match;
+ |
MatchCollection = System.Text.RegularExpressions.MatchCollection;
+ |
MatchEvaluator = System.Text.RegularExpressions.MatchEvaluator;
+, Regex.Replace |
Object = System.Object;
+ |
Predicate<T> = System.Predicate<T>;
+, boolean |
Predicate2<T1, T2> = function(x1: T1; x2: T2): boolean;
+, boolean |
Predicate3<T1, T2, T3> = function(x1: T1; x2: T2; x3: T3): boolean;
+, boolean |
Queue<T> = System.Collections.Generic.Queue<T>;
+- , " - " |
RealFunc = Func<real, real>;
+, |
Regex = System.Text.RegularExpressions.Regex;
+ |
RegexGroup = System.Text.RegularExpressions.Group;
+Regex.Match |
RegexGroupCollection = System.Text.RegularExpressions.GroupCollection;
+Regex.Match |
RegexOptions = System.Text.RegularExpressions.RegexOptions;
+ |
ShortString = string[255];
+255 |
SortedDictionary<Key, Value> = System.Collections.Generic.SortedDictionary<Key, Value>;
+, |
SortedList<Key, Value> = System.Collections.Generic.SortedList<Key, Value>;
+( -), |
SortedSet<T> = System.Collections.Generic.SortedSet<T>;
+, |
Stack<T> = System.Collections.Generic.Stack<T>;
+- , " - " |
StringBuilder = System.Text.StringBuilder;
+ |
StringFunc = Func<string, string>;
+, |
Tuple = System.Tuple;
+ |
function Arr<T>(params a: array of T): array of T;
+, |
function Arr<T>(a: sequence of T): array of T;
+, |
function ArrFill<T>(count: integer; x: T): array of T;
+count x |
function ArrGen<T>(count: integer; gen: integer->T): array of T;
+count , gen(i) |
function ArrGen<T>(count: integer; gen: integer->T; from: integer): array of T;
+count , gen(i), i=from |
function ArrGen<T>(count: integer; first: T; next: T->T): array of T;
+count , first, next |
function ArrGen<T>(count: integer; first, second: T; next: (T,T) ->T): array of T;
+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;
+n, |
function ArrRandomReal(n: integer := 10; a: real := 0; b: real := 10): array of real;
+n, |
function ReadArrInteger(n: integer): array of integer;
+n , |
function ReadArrInteger(prompt: string; n: integer): array of integer;
+n , |
function ReadArrReal(n: integer): array of real;
+n , |
function ReadArrReal(prompt: string; n: integer): array of real;
+n , |
function ReadArrString(n: integer): array of string;
+n , |
function ReadArrString(prompt: string; n: integer): array of string;
+n , |
function Copy(a: array of T): array of T;
+ |
function High(a: array of T): integer;
+ |
function Length(a: array of T): integer;
+ |
function Length(a: array of T; dim: integer): integer;
+dim |
function Low(a: array of T): integer;
+0 |
procedure Reverse<T>(a: array of T);
+ |
procedure Reverse<T>(a: array of T; index, count: integer);
+count, index |
procedure Reverse<T>(a: List<T>);
+ |
procedure Reverse<T>(a: List<T>; index, count: integer);
+count, index |
procedure SetLength(var a: array of T);
+. |
procedure SetLength(var a: array of T; n1,n2,...: integer);
+n- . |
procedure Shuffle<T>(a: array of T);
+ |
procedure Shuffle<T>(l: List<T>);
+ |
procedure Sort<T>(a: array of T);
+ |
procedure Sort<T>(a: array of T; cmp: (T,T)->integer);
+, cmp |
procedure Sort<T>(a: array of T; less: (T,T)->boolean);
+, less |
procedure Sort<T>(l: List<T>);
+ |
procedure Sort<T>(l: List<T>; cmp: (T,T)->integer);
+, cmp |
procedure Sort<T>(l: List<T>; less: (T,T)->boolean);
+, less |
function FilePos(f: ): int64;
+ |
function FileSize(f: ): int64;
+ |
procedure Reset(f: );
+. - file of T, file |
procedure Reset(f: ; name: string);
+f name . - file of T, file |
procedure Rewrite(f: );
+, . , . - file of T, file |
procedure Rewrite(f: ; name: string);
+f name , . - file of T, file |
procedure Seek(f: ; n: int64);
+ |
procedure Truncate(f: );
+, . - file of T, file |
function Chr(a: word): char;
+Unicode |
function ChrAnsi(a: byte): char;
+Windows |
function ChrUnicode(a: word): char;
+Unicode |
procedure Dec(var c: char);
+c 1 |
procedure Dec(var c: char; n: integer);
+c n |
procedure Inc(var c: char);
+c 1 |
procedure Inc(var c: char; n: integer);
+c n |
function LowCase(ch: char): char;
+ |
function LowerCase(ch: char): char;
+ |
function Ord(a: char): word;
+Unicode |
function OrdAnsi(a: char): byte;
+Windows |
function OrdUnicode(a: char): word;
+Unicode |
function Pred(x: char): char;
+x |
function Succ(x: char): char;
+x |
function UpCase(ch: char): char;
+ |
function UpperCase(ch: char): char;
+ |
function MatrFill<T>(m,n: integer; x: T): array [,] of T;
+m x n, x |
function MatrGen<T>(m,n: integer; gen: (integer,integer)->T): array [,] of T;
+m x n, x |
function MatrRandom(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
+m x n, |
function MatrRandomInteger(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
+m x n, |
function MatrRandomReal(m: integer := 5; n: integer := 5; a: real := 0; b: real := 10): array [,] of real;
+m x n, |
function Matr<T>(m,n: integer; params data: array of T): array [,] of T;
+m x n, |
function MatrFill<T>(m, n: integer; x: T): array [,] of T;
+m x n, x |
function MatrGen<T>(m, n: integer; gen: (integer,integer)->T): array [,] of T;
+m x n, x |
function MatrRandom(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
+m x n, |
function MatrRandomInteger(m: integer := 5; n: integer := 5; a: integer := 0; b: integer := 100): array [,] of integer;
+m x n, |
function MatrRandomReal(m: integer := 5; n: integer := 5; a: real := 0; b: real := 10): array [,] of real;
+m x n, |
function ReadMatrInteger(m, n: integer): array [,] of integer;
+m n , |
function ReadMatrReal(m, n: integer): array [,] of real;
+m n , |
function Transpose<T>(a: array [,] of T): array [,] of T;
+ |
function Partition(a, b: real; n: integer): sequence of real;
+[a,b] n |
function Range(a, b: integer): sequence of integer;
+a b |
function Range(c1, c2: char): sequence of char;
+c1 c2 |
function Range(a, b: real; n: integer): sequence of real;
+[a,b] n ( Partition) |
function Range(a, b, step: integer): sequence of integer;
+a b step |
function ReadSeqInteger(n: integer): sequence of integer;
+n , |
function ReadSeqInteger(prompt: string; n: integer): sequence of integer;
+n , |
function ReadSeqIntegerWhile(cond: integer->boolean): sequence of integer;
+, |
function ReadSeqIntegerWhile(prompt: string; cond: integer->boolean): sequence of integer;
+, |
function ReadSeqReal(n: integer): sequence of real;
+n , |
function ReadSeqReal(prompt: string; n: integer): sequence of real;
+n , |
function ReadSeqRealWhile(cond: real->boolean): sequence of real;
+, |
function ReadSeqRealWhile(prompt: string; cond: real->boolean): sequence of real;
+, |
function ReadSeqString(n: integer): sequence of string;
+n , |
function ReadSeqString(prompt: string; n: integer): sequence of string;
+n , |
function ReadSeqStringWhile(cond: string->boolean): sequence of string;
+, |
function ReadSeqStringWhile(prompt: string; cond: string->boolean): sequence of string;
+, |
function Seq<T>(params a: array of T): sequence of T;
+ |
function SeqFill<T>(count: integer; x: T): sequence of T;
+count x |
function SeqGen<T>(count: integer; f: integer->T): sequence of T;
+count , f(i) |
function SeqGen<T>(count: integer; f: integer->T; from: integer): sequence of T;
+count , f(i), i=from |
function SeqGen<T>(count: integer; first: T; next: T->T): sequence of T;
+count , first, next |
function SeqGen<T>(count: integer; first, second: T; next: (T,T) ->T): sequence of T;
+count , first second, next |
function SeqRandom(n: integer := 10; a: integer := 0; b: integer := 100): sequence of integer;
+n |
function SeqRandomInteger(n: integer := 10; a: integer := 0; b: integer := 100): sequence of integer;
+n |
function SeqRandomReal(n: integer := 10; a: real := 0; b: real := 10): sequence of real;
+n |
function SeqWhile<T>(first: T; next: T->T; pred: T->boolean): sequence of T;
+first, next pred |
function SeqWhile<T>(first, second: T; next: (T,T) ->T; pred: T->boolean): sequence of T;
+, first second, next pred |
procedure Exclude(var s: set of T; element: T);
+element s |
procedure Include(var s: set of T; element: T);
+element s |
function CompareStr(s1, s2: string): integer;
+. < 0 s1<s2, > 0 s1>s2 = 0 s1=s2 |
function Concat(s1,s2,...): string;
+, s1,s2,... |
function Concat(s1, s2: string): string;
+, s1 s2 |
function Copy(s: string; index, count: integer): string;
+s count index |
procedure Delete(var s: string; index, count: integer);
+s count index |
function FloatToStr(a: real): string;
+ |
function Format(formatstring: string; params pars: array of object): string;
+, |
procedure Insert(source: string; var s: string; index: integer);
+source s index |
function IntToStr(a: integer): string;
+ |
function IntToStr(a: int64): string;
+ |
function LastPos(subs, s: string): integer;
+subs s. , 0 |
function LastPos(subs, s: string; from: integer): integer;
+subs s from. , 0 |
function LeftStr(s: string; count: integer): string;
+count s |
function Length(s: string): integer;
+ |
function LowerCase(s: string): string;
+ |
function Pos(subs, s: string; from: integer := 1): integer;
+subs s. , 0 |
function PosEx(subs, s: string; from: integer := 1): integer;
+subs s from. , 0 |
function ReadIntegerFromString(s: string; var from: integer): integer;
+from from |
function ReadRealFromString(s: string; var from: integer): real;
+from from |
function ReadWordFromString(s: string; var from: integer): string;
+from from |
function ReverseString(s: string): string;
+ |
function ReverseString(s: string; index,length: integer): string;
+length index |
function RightStr(s: string; count: integer): string;
+count s |
procedure SetLength(var s: string; n: integer);
+s n |
procedure Str(i: ; var s: string);
+i s |
procedure Str(r: real; var s: string);
+r s |
procedure Str(r: single; var s: string);
+r s |
function StringIsEmpty(s: string; var from: integer): boolean;
+True False |
function StringOfChar(ch: char; count: integer): string;
+, count ch |
function StrToFloat(s: string): real;
+ |
function StrToInt(s: string): integer;
+ |
function StrToInt64(s: string): int64;
+ |
function StrToReal(s: string): real;
+ |
function Trim(s: string): string;
+ |
function TrimLeft(s: string): string;
+ |
function TrimRight(s: string): string;
+ |
function TryReadIntegerFromString(s: string; var from: integer; var res: integer): boolean;
+from from . True False |
function TryReadRealFromString(s: string; var from: integer; var res: real): boolean;
+from from . True False |
function TryStrToFloat(s: string; var value: real): boolean;
+s value. False |
function TryStrToFloat(s: string; var value: single): boolean;
+s value. False |
function TryStrToInt(s: string; var value: integer): boolean;
+s value. False |
function TryStrToInt64(s: string; var value: int64): boolean;
+s value. False |
function TryStrToReal(s: string; var value: real): boolean;
+s value. False |
function TryStrToSingle(s: string; var value: single): boolean;
+s value. False |
function UpperCase(s: string): string;
+ |
procedure Val(s: string; var value: ; var err: integer);
+s value. , err=0, err>0 |
procedure Append(f: Text);
+Windows |
procedure Append(f: Text; en: Encoding);
+ |
procedure Append(f: Text; name: string);
+f name Windows |
procedure Append(f: Text; name: string; en: Encoding);
+f name |
function Eoln(f: Text): boolean;
+True, |
procedure Flush(f: Text);
+ |
function OpenAppend(fname: string): Text;
+fname, Windows |
function OpenAppend(fname: string; en: Encoding): Text;
+fname, |
function OpenRead(fname: string): Text;
+fname, Windows |
function OpenRead(fname: string; en: Encoding): Text;
+fname, |
function OpenWrite(fname: string): Text;
+fname, Windows |
function OpenWrite(fname: string; en: Encoding): Text;
+fname, |
function ReadAllLines(path: string): array of string;
+, Windows , |
function ReadAllLines(path: string; en: Encoding): array of string;
+, , |
function ReadAllText(path: string): string;
+, Windows , |
function ReadAllText(path: string; en: Encoding): string;
+, , |
function ReadLines(path: string): sequence of string;
+, Windows . |
function ReadLines(path: string; en: Encoding): sequence of string;
+, . |
procedure Reset(f: Text);
+Windows |
procedure Reset(f: Text; en: Encoding);
+ |
procedure Reset(f: Text; name: string);
+f name Windows |
procedure Reset(f: Text; name: string; en: Encoding);
+f name |
procedure Rewrite(f: Text);
+Windows. - , - |
procedure Rewrite(f: Text; en: Encoding);
+. - , - |
procedure Rewrite(f: Text; name: string);
+name f Windows. - , - |
procedure Rewrite(f: Text; name: string; en: Encoding);
+f name f . - , - |
function SeekEof(f: Text): boolean;
+, True, |
function SeekEoln(f: Text): boolean;
+, True, |
procedure WriteAllLines(path: string; ss: array of string);
+, Windows, |
procedure WriteAllLines(path: string; ss: array of string; en: Encoding);
+, , |
procedure WriteAllText(path: string; s: string);
+, Windows, |
procedure WriteAllText(path: string; s: string; en: Encoding);
+, , |
procedure WriteLines(path: string; ss: sequence of string);
+, Windows, |
procedure WriteLines(path: string; ss: sequence of string; en: Encoding);
+, , |
function Rec(x1: T1, x2: T2,...): (T1,T2,...);
+ |
function CreateBinary<T>(fname: string): file of T;
+ |
function CreateFile<T>(fname: string): file of T;
+ |
function CreateFileInteger(fname: string): file of integer;
+ |
function CreateFileReal(fname: string): file of real;
+ |
function OpenBinary<T>(fname: string): file of T;
+ |
function OpenFile<T>(fname: string): file of T;
+ |
function OpenFileInteger(fname: string): file of integer;
+ |
function OpenFileReal(fname: string): file of real;
+ |
procedure WriteElements<T>(fname: string; ss: sequence of T);
+, |
procedure Assert(cond: boolean; sourceFile: string := ''; line: integer := 0);
+ |
procedure Assert(cond: boolean; message: string; sourceFile: string := ''; line: integer := 0);
+ |
function ChangeFileNameExtension(name, newext: string): string;
+name newext |
procedure ChDir(s: string);
+ |
function CreateDir(s: string): boolean;
+. True, |
function DeleteFile(s: string): boolean;
+. , False |
function DiskFree(diskname: string): int64;
+diskname |
function DiskFree(disk: integer): int64;
+disk. disk=0 - , disk=1 - A: , disk=2 - B: .. |
function DiskSize(diskname: string): int64;
+diskname |
function DiskSize(disk: integer): int64;
+disk. disk=0 - , disk=1 - A: , disk=2 - B: .. |
procedure Dispose<T>(var p: ^T);
+, p |
function EnumerateAllDirectories(path: string): sequence of string;
+, |
function EnumerateAllFiles(path: string; searchPattern: string := '*.*'): sequence of string;
+, , |
function EnumerateDirectories(path: string): sequence of string;
+ |
function EnumerateFiles(path: string; searchPattern: string := '*.*'): sequence of string;
+, |
procedure Exec(filename: string);
+filename |
procedure Exec(filename: string; args: string);
+filename args |
procedure Execute(filename: string);
+filename |
procedure Execute(filename: string; args: string);
+filename args |
function FileExists(name: string): boolean;
+True, name |
function GetCurrentDir: string;
+ |
function GetDir: string;
+ |
function GetEXEFileName: string;
+.exe- |
procedure Halt(exitCode: integer);
+, exitCode |
procedure Halt;
+ |
function Milliseconds: integer;
+ |
function MillisecondsDelta: integer;
+Milliseconds MillisecondsDelta |
procedure MkDir(s: string);
+ |
procedure New<T>(var p: ^T);
+sizeof(T) p . T |
function ParamCount: integer;
+ |
function ParamStr(i: integer): string;
+i- |
function PascalABCVersion: string;
+PascalABC.NET |
function PointerToString(p: pointer): string;
+ |
function RemoveDir(s: string): boolean;
+. True, |
function RenameFile(name, newname: string): boolean;
+name, newname. True, |
procedure RmDir(s: string);
+ |
function SetCurrentDir(s: string): boolean;
+. True, |
procedure Sleep(ms: integer);
+ms |
procedure Print(a,b,...);
+a,b,... , |
procedure Print(f: Text; a,b,...);
+a,b,... f, |
procedure Println(a,b,...);
+a,b,... , |
procedure Println(f: Text; a,b,...);
+a,b,... f, |
procedure Write(a,b,...);
+a,b,... |
procedure Write(f: ; a,b,...);
+a,b,... f |
procedure WriteFormat(formatstr: string; params args: array of object);
+args formatstr |
procedure WriteFormat(f: Text; formatstr: string; params args: array of object);
+args f formatstr |
procedure Writeln(a,b,...);
+a,b,... |
procedure Writeln(f: Text; a,b,...);
+a,b,... f |
procedure WritelnFormat(formatstr: string; params args: array of object);
+args formatstr |
procedure WritelnFormat(f: Text; formatstr: string; params args: array of object);
+args f formatstr |
begin
+ction TakeGroup: sequence of T; |
begin
+le fin do |
begin
+e |
break;
+:= enm.Current; |
end;
+:= enm.Current; |
end;
+; |
enm: IEnumerator<T>;
+: T; |
enm := a.GetEnumerator();
+in |
fin := enm.movenext;
+ld cur; |
fin := enm.movenext;
+; |
if fin then
+:= enm.MoveNext; |
private
+GroupClass<T> = class |
public
+: boolean; |
yield enm.current
+enm.current = cur then |
function MatrGen<T>(m, n: integer; gen: (integer,integer)->T): array [,] of T;
+ction MatrFill<T>(m, n: integer; x: T): array [,] of T; |
function MatrRandom(m: integer; n: integer; a, b: integer): array [,] of integer;
+ction Matr<T>(m,n: integer; params data: array of T): array [,] of T; |
function MatrRandomReal(m: integer; n: integer; a, b: real): array [,] of real;
+ction MatrRandomInteger(m: integer; n: integer; a, b: integer): array [,] of integer; |
function ReadMatrInteger(m, n: integer): array [,] of integer;
+ction Transpose<T>(a: array [,] of T): array [,] of T; |
function Print(Self: real): real; extensionmethod;
+ction Print(Self: integer): integer; extensionmethod; |
function Print(Self: boolean): boolean; extensionmethod;
+ction Print(Self: char): char; extensionmethod; |
function Println(Self: integer): integer; extensionmethod;
+ction Print(Self: BigInteger): BigInteger; extensionmethod; |
function Println(Self: char): char; extensionmethod;
+ction Println(Self: real): real; extensionmethod; |
function Println(Self: BigInteger): BigInteger; extensionmethod;
+ction Println(Self: boolean): boolean; extensionmethod; |
| + | + | + |
+ Pi |
+ real |
+ 3.14159265358979 |
+
+ MaxInt |
+ integer |
+
+ integer: 2147483647 |
+
+ MaxReal |
+ real |
+
+ real: 1.7E308 |
+
+ MinReal |
+ real |
+
+ real: 4.94065645841247E-324 |
+
| + | + | + | + | + |
+Assign(f,name) |
+ + | f -
+ ,
+ name - string |
+ + |
+ f name |
+
+ Reset(f) |
+ + | f -
+ |
+ + | ,
+ f Assign. ,
+ .
+ , - |
+
+ Rewrite(f) |
+ + | f -
+ |
+ + | ,
+ f
+ Assign. ,
+ , .
+ , - |
+
+ Append(f) |
+ + | f -
+ Text |
+ + | . + . | +
+ Close(f) |
+ + | f -
+ |
+ + | + |
+ FileExists(name) |
+ + | name -
+ string |
+ boolean |
+ True,
+ name,
+ False |
+
+ CanCreateFile(name) |
+ + | name -
+ string |
+ boolean |
+ True,
+ name,
+ False |
+
+Read(f,a,b,...) |
+ + | f -
+ , a,b -
+ , string |
+ + | f a,
+ b
+ ... ,
+ a,
+ b
+ ... ,
+ . , a,
+ b
+ ... ,
+ |
+
+Write(f,a,b,...) |
+ + | f -
+ , a,b -
+ , string |
+ + | a,
+ b
+ ... f.
+ , a,
+ b
+ ...
+ . ,
+ a,
+ b
+ ... ,
+ |
+
+Readln(f,a,b,...) |
+ + | f -
+ Text, a,b -
+ , string |
+ + |
+ f a,
+ b
+ ..., .
+ readln(f)
+ |
+
+Writeln(f,a,b,...) |
+ + | f -
+ Text, a,b -
+ , string |
+ + | a,
+ b
+ ...
+ f, . a,
+ b
+ ... ,
+ . writeln(f)
+ |
+
+ Eof(f) |
+ + | f -
+ |
+ boolean |
+ True,
+ , False
+ |
+
+ Eoln(f) |
+ + | f -
+ Text |
+ boolean |
+ True,
+ , False
+ |
+
+ SeekEof(f) |
+ + | f -
+ Text |
+ boolean |
+ ,
+ , True,
+ , False
+ |
+
+ SeekEoln(f) |
+ + | f -
+ Text |
+ boolean |
+ , ,
+ True,
+ , False
+ |
+
+ FileSize(f) |
+ + | f -
+ file |
+ integer |
+ + |
+ FilePos(f) |
+ + | f -
+ file |
+ integer |
+ + ( ) | +
+ Seek(f,n) |
+ + | f -
+ file |
+ + | + n- ( ) | +
+ Truncate(f) |
+ + | f -
+ file |
+ + | + | +
+ Rename(f,name) |
+ + | f -
+ ,
+ name - string |
+ + | ,
+
+ f. |
+
+ Erase(f) |
+ + | f -
+ |
+ + | ,
+ f. |
+
| + | + | + | + |
+New(p) |
+ + | p -
+ |
+ ,
+ , p,
+ p |
+
+ Dispose(p) |
+ + | p -
+ |
+ p,
+ New |
+
+ GetMem(p,n) |
+ + | p -
+ ,
+ n - integer |
+ n
+
+ p |
+
+ FreeMem(p) |
+ + | p -
+ |
+ p,
+ GetMem |
+
+ FillMem(v,count,x) |
+ + | v - ,
+ count - integer, - byte |
+ count
+ x , v.
+ |
+
+ CopyMem(src,dest,count) |
+ + | src, dest -
+ pointer, count - integer |
+ count
+ , src,
+ , dest.
+ . |
+
+ + + diff --git a/PABCNetHelp/LangGuide/PABCSystemUnit/Old/readwrite.htm b/PABCNetHelp/LangGuide/PABCSystemUnit/Old/readwrite.htm new file mode 100644 index 000000000..8767d4b28 --- /dev/null +++ b/PABCNetHelp/LangGuide/PABCSystemUnit/Old/readwrite.htm @@ -0,0 +1,74 @@ + + + + + +
write writeln. ,
+ .
+ ( ,
+ ), string, .
+ writeln
+ .
write writeln
+ ,
+ ,
+. ,
+ , .
+ ,
+ ;
+ . ,
+ .
+ :m
+ .
, a, b -
+,
+ a:=-2437; b:=13555;
+ writeln(a:6,'!':9);
+ writeln(b:1);
+
+ : -2437 !
+13555
+:m:n, m n - . m ,
+ n .
+:
+ writeln(-14.859:10:3); // ___-14.859
+ writeln(-14.859:10:5); // _-14.85900
+ writeln(-14.859:10:2); // ____-14.86
+ writeln(-14.859:10:0); // _______-15
+ writeln(-14.859:10:7); // -14.8590000
+ writeln((0,1):10:1); // _(0.0,1.0)
+( _ ).
+ read readln.
+ , .
+
+ ( ,
+ ), string.
+ readln
+ .
write, writeln,
+read, readln
+- ,
+ .
- , + :
+++ + + diff --git a/PABCNetHelp/LangGuide/PABCSystemUnit/Old/string.htm b/PABCNetHelp/LangGuide/PABCSystemUnit/Old/string.htm new file mode 100644 index 000000000..3c14f22d1 --- /dev/null +++ b/PABCNetHelp/LangGuide/PABCSystemUnit/Old/string.htm @@ -0,0 +1,267 @@ + + + + + ++
writeln(f,'abc',1,True,2.4);
| + | + | + | + | + |
+Length(s) |
+ + | s - string |
+ integer |
+ s |
+
+ Copy(s,index,count) |
+ + | s - string,
+ index count -
+ integer |
+ string |
+
+ s count,
+ index |
+
+ Delete(s,index,count) |
+ + | s - string,
+ index count -
+ integer |
+ + |
+ s count
+ index |
+
+ Insert(subs,s,index) |
+ + | s,
+ subs - string,
+ index - integer |
+ + |
+ subs
+ s index |
+
+ Pos(subs,s) |
+ + | s,
+ subs - string |
+ integer |
+
+ subs s
+ ( 0 ) |
+
+ SetLength(s,n) |
+ + | s - string,
+ n - integer |
+ + |
+ s n |
+
+ Str(x,s) |
+ + | s - string,
+ x - integer,
+ real
+ n,
+ m - integer |
+ + | x
+ ( ,
+
+ n
+ m)
+ s |
+
+ Val(s,v,code) |
+ + | s - string,
+ v - integer,
+ real, code -
+ integer |
+ + | s
+
+ v. ,
+ code 0,
+ , code
+ |
+
+ Concat(s1,...,sn) |
+ + | s1,..., sn - string |
+ string |
+ ,
+ s1,..., sn.
+ , s1+s2+...+sn |
+
+ IntToStr(i) |
+ + | i - integer |
+ string |
+ + |
+ StrToInt(s) |
+ + | s - string |
+ integer |
+ . + , | +
+ FloatToStr(r) |
+ + | r - real |
+ string |
+ + |
+ StrToFloat(s) |
+ + | s - string |
+ real |
+ . + , | +
+ UpCase(c)
+ |
+ + | c -
+ char |
+ char |
+ c,
+ |
+
+ LowCase(c)
+ |
+ + | c -
+ char |
+ char |
+ c,
+ |
+
+ UpperCase(s)
+ |
+ + | s - string |
+ string |
+
+ s, |
+
+ LowerCase(s)
+ |
+ + | s - string |
+ string |
+ s,
+ |
+
+ Trim(s)
+ |
+ + | s - string |
+ string |
+ s
+ |
+
+ TrimLeft(s)
+ |
+ + | s - string |
+ string |
+ s
+ |
+
+ TrimRight(s)
+ |
+ + | s - string |
+ string |
+ s
+ |
+
+
+
+
+
+
| + | + | + | + | + |
+ Sleep(ms) |
+ + | ms - integer |
+ + |
+ ms |
+
+ Cls |
+ + | + | + | + |
+ Halt(n) |
+ + | n - integer |
+ + | . + " + Halt(n)" | +
+ Halt |
+ + | + | + | + | +
+ Assert(b) |
+ + | b - boolean |
+ + | b=False,
+ EAssertionFailed.
+ |
+
+ Assert(b,mess) |
+ + | b - boolean,
+ mess - string |
+ + | b=False,
+ EAssertionFailed
+ mess.
+ . |
+
+ + ++ + + diff --git a/PABCNetHelp/LangGuide/PABCSystemUnit/Old2016/_main_old.html b/PABCNetHelp/LangGuide/PABCSystemUnit/Old2016/_main_old.html new file mode 100644 index 000000000..0a56933b2 --- /dev/null +++ b/PABCNetHelp/LangGuide/PABCSystemUnit/Old2016/_main_old.html @@ -0,0 +1,44 @@ + + + + + +
PABCSystem + . +, , , .
+
+procedure Swap<T>(var a, b: T); + |
+
+
+ function Milliseconds: integer;+ |
+
+
+ function MillisecondsDelta: integer;+ + +
+ Milliseconds
+
+ MillisecondsDelta. |
+
+
+ function Rec<T1,T2,...>(x1: T1; x2: T2, ...): Tuple<T1,T2,...>; + Tuple . + Item1, Item2 .. + x1,x2,... - 2 6. |
+
+ function Dict<TKey, TVal>(params pairs:
+ array of KeyValuePair<TKey, TVal>): Dictionary<TKey, TVal>;
+ + |
+
+ function KV<TKey, TVal>(key: TKey; value: TVal):
+ KeyValuePair<TKey, TVal>; + Dict |
+
+
+procedure Assert(cond: boolean);
++ + |
+
+procedure Assert(cond: boolean; mes: string);
++ mes + |
+
+ procedure Sleep(ms: integer);
++ ms + |
+
+
+procedure Halt;
++ + |
+
+procedure Halt(exitCode: integer);
++ , exitCode + |
+
+procedure Exec(filename: string);
++ filename + |
+
+
+procedure Exec(filename: string; args: string);
++ filename + args |
+
+
+procedure Execute(filename: string);
++ filename + |
+
+
+procedure Execute(filename: string; args:
+string);
++ filename + args |
+
+
+function ParamCount: integer;
++ + |
+
+
+function ParamStr(i: integer): string;
++ i- + |
+
+procedure New<T>(var p: ^T); + sizeof(T) p .
+ T |
+
+procedure Dispose<T>(var p: ^T);
++ , +p |
+
+
+function GetEXEFileName: string;
++ .exe- + |
+
+
+function PointerToString(p: pointer): string;
++ + |
+
+
+ MaxShortInt = shortint.MaxValue;
++ shortint + |
+
+ MaxByte = byte.MaxValue;
++ byte + |
+
+ MaxSmallInt = smallint.MaxValue;
++ smallint + |
+
+ MaxWord = word.MaxValue;
++ word + |
+
+ MaxInt = integer.MaxValue;
++ integer + |
+
+ MaxLongWord = longword.MaxValue;
++ longword + |
+
+ MaxInt64 = int64.MaxValue;
++ int64 + |
+
+ MaxUInt64 = uint64.MaxValue;
++ uint64 + |
+
+ MaxDouble = real.MaxValue;
++ double + |
+
+ MinDouble = real.Epsilon;
++ double + |
+
+ MaxReal = real.MaxValue;
++ real + |
+
+ MinReal = real.Epsilon;
++ real + |
+
+ MaxSingle = single.MaxValue;
++ single + |
+
+ MinSingle = single.Epsilon;
++ single + |
+
+ Pi = 3.141592653589793;
++ Pi + |
+
+ E = 2.718281828459045;
++ E + |
+
+ NewLine: string; + + |
+ output + . + , Assign + |
+
+ input + . , + Assign + |
+function Length(a:
+System.Array): integer; + |
+
+function Length(a:
+System.Array; m: integer): integer; + +m- ( + ) |
+
+procedure SetLength(var a:
+System.Array; n: integer); + . + . a + . |
+
+procedure SetLength(var a:
+System.Array; n1,n2,...: integer); + + n- . +. a +. |
+
+
+function Copy(a:
+System.Array): System.Array;
++ |
+
+ function Low(a: System.Array): integer; + ( - 0) |
+
+ function High(a: System.Array): integer; + ( - + 0) |
+
+ procedure Sort<T>(a: array of T);
+ + + |
+
+ procedure Reverse<T>(a: array of T);
+ + + |
+
+ procedure Reverse<T>(a: array of T;
+ index,length: integer); + + length index + |
+ function Arr<T>(params a:
+ array of T): array of T; + , |
+
+ function ArrGen<T>(count: integer; first: T; next: T->T): array of T; + count , first, + next |
+
+ function ArrGen<T>(count: integer; first,second: T; next:
+ (T,T)->T): array of T; + count , first second, + next |
+ function ArrGen<T>(count: integer; f:
+ integer->T): array of T; + count , f(i) |
+ function ArrFill<T>(count: integer; x: T):
+ array of T; + count x |
+ 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; + n, + |
+ function ArrRandomReal(n: integer := 10; a: real :=
+ 0; b: real := 10): array of real; + n, + |
+
+ function MatrixRandom(m: integer := 5; n: integer :=
+ 5; a: integer := 0; b: integer := 100): array [,]
+ of integer; + m x n, + |
+
+ function MatrixRandomReal(m: integer := 5; n: integer
+ := 5; a: integer := 0; b: integer := 10): array [,]
+ of real; + m x n, + |
+
+ function ReadArrInteger(n: integer): array of
+ integer; + n , |
+
+ function ReadArrInteger(const
+ prompt: string; n: integer): array of integer; + n , + |
+
+ function ReadArrReal(n: integer): array of
+ real; + n , |
+
+ function ReadArrReal(const prompt: string; n:
+ integer): array of real; + n , + |
+
+ function ReadArrString(n: integer): array of
+ string; + n , |
+
+ function ReadArrString(const prompt:
+ string; n: integer): array of string; + n , + |
+
+procedure Inc(var i: integer);
++ + i 1
+ |
+
+procedure Inc(var i: integer; n: integer);
++ + i n
+ |
+
+procedure Dec(var i: integer);
++ + i 1
+ |
+
+procedure Dec(var i: integer; n: integer);
++ + i n
+ |
+
+procedure Inc(var c: char);
++ c 1
+ |
+
+
+procedure Inc(var c: char; n: integer);
++ c
+n
+ |
+
+
+procedure Dec(var c: char);
++ c 1
+ |
+
+
+procedure Dec(var c: char; n: integer);
++ c
+n
+ |
+
+
+procedure Inc(var e:
+System.Enum);
++ + e 1
+ |
+
+procedure Inc(var e:
+System.Enum; n: integer);
++ e
+ n
+ |
+
+procedure Dec(var e:
+System.Enum);
++ e 1
+ |
+
+procedure Dec(var e:
+System.Enum; n: integer);
++ e 1
+ |
+
+function Succ(x: integer): integer;
++ x
+ |
+
+function Succ(x: boolean): boolean;
++ x
+ |
+
+function Succ(x: byte): byte;
++ x
+ |
+
+function Succ(x: shortint): shortint;
++ x
+ |
+
+function Succ(x: smallint): smallint;
++ x
+ |
+
+function Succ(x: word): word;
++ x
+ |
+
+function Succ(x: longword): longword;
++ x
+ |
+
+function Succ(x: int64): int64;
++ x
+ |
+
+function Succ(x: uint64): uint64;
++ x
+ |
+
+function Succ(x: char): char;
++ x
+ |
+
+
+function Succ(e:
+System.Enum): System.Enum;
++
+e
+ |
+
+function Pred(x: boolean): boolean;
++ x
+ |
+
+function Pred(x: byte): byte;
++ x
+ |
+
+function Pred(x: shortint): shortint;
++ x
+ |
+
+function Pred(x: smallint): smallint;
++ x
+ |
+
+function Pred(x: word): word;
++ x
+ |
+
+function Pred(x: integer): integer;
++ x
+ |
+
+function Pred(x: longword): longword;
++ x
+ |
+
+function Pred(x: int64): int64;
++ x
+ |
+
+function Pred(x: uint64): uint64;
++ x
+ |
+
+function Pred(x: char): char;
++ x
+ |
+
+
+function Pred(e: System.Enum):
+System.Enum;
++ +
+e
+ |
+
+function Odd(i: integer): boolean;
++ True, i
+ |
+
+function Odd(i: longword): boolean;
++ True, i
+ |
+
+function Odd(i: int64): boolean;
++ True, i
+ |
+
+function Odd(i: uint64): boolean;
++ True, i
+ |
+
+function Ord(a: char): byte;
++ |
+
+function Ord(a: integer): integer;
++ + a
+ |
+
+function Ord(a: longword): longword;
++ + a
+ |
+
+function Ord(a: int64): int64;
++ + a
+ |
+
+function Ord(a: uint64): uint64;
++ + a
+ |
+
+function Ord(a: boolean): integer;
++ + a
+ |
+
+
+function Ord(e: System.Enum): integer;
++ +
+e
+ |
+
+procedure Assign(f: FileType; name: string);
++ f name + |
+
+procedure AssignFile(f: FileType; name: string);
++ f name + |
+
+procedure Reset(f: Text);
++ f + |
+
+procedure Reset(f: file of T);
++ f + |
+
+procedure Reset(f: file);
++ f + |
+
+procedure Rewrite(f: Text);
++ f , . , + |
+
+procedure Rewrite(f: file of T);
++ f , . , + |
+
+procedure Rewrite(f: file);
++ f , . , + |
+
+ procedure Append(f: Text);
++ f + |
+
+
+function OpenRead(fname: string): Text;
++ fname, + |
+
+
+function OpenWrite(fname: string): Text;+ fname, + |
+
+
+function OpenAppend(fname: string): Text;+ fname, |
+
+ procedure Close(f: FileType);
++ f + |
+
+
+ procedure CloseFile(f: FileType);
++ f + |
+
+
+function Eof(f: FileType): boolean;
++ True, f + |
+
+procedure Flush(f: FileType);
++ + |
+
+procedure Erase(f: FileType);
++ , f + |
+
+procedure Rename(f: FileType; newname: string);
++ , f, newname + |
+
+function Eoln(f: Text): boolean;
++ True, f + |
+
+function SeekEof(f: Text): boolean;
++ , True, f + |
+
+function SeekEoln(f: Text): boolean;
++ , True, f + |
+
+procedure Truncate(f: file of T);
++ f, + |
+
+procedure Truncate(f: file);
++ f, + |
+
+function FilePos(f: file of T): int64;
++ f + |
+
+function FilePos(f: file): int64;
++ f + |
+
+function FileSize(f: file of T): int64;
++ f + |
+
+function FileSize(f: file): int64;
++ f + |
+
+procedure Seek(f: file of T; n: int64);
++ f n + |
+
+procedure Seek(f: file; n: int64);
++ f n + |
+
+function ExtractFileName(fname: string): string;
++ fname + |
+
+function ExtractFileExt(fname: string): string;
++ fname + |
+
+function ExtractFilePath(fname: string): string;
++ fname + |
+
+function ExtractFileDir(fname: string): string;
++ fname + |
+
+function ExtractFileDrive(fname: string): string;
++ fname + |
+
+function ExpandFileName(fname: string): string;
++ fname + |
+ System Math + Delphi.
+
+
+function Sign(x: integer): integer;
++ x + |
+
+function Sign(x: longword): integer;
++ x + |
+
+function Sign(x: int64): integer;
++ x + |
+
+function Sign(x: uint64): integer;
++ x + |
+
+function Sign(x: real): integer;
++ x + |
+
+function Abs(x: integer): integer;
++ x + |
+
+function Abs(x: longword): longword;
++ x + |
+
+function Abs(x: int64): int64;
++ x + |
+
+function Abs(x: uint64): uint64;
++ x + |
+
+function Abs(x: real): real;
++ x + |
+
+function Sin(x: real): real;
++ x + |
+
+function Sinh(x: real): real;
++ x + |
+
+function Cos(x: real): real;
++ x + |
+
+function Cosh(x: real): real;
++ x + |
+
+function Tan(x: real): real;
++ x + |
+
+function Tanh(x: real): real;
++ x + |
+
+function ArcSin(x: real): real;
++ x + |
+
+function ArcCos(x: real): real;
++ x + |
+
+function ArcTan(x: real): real;
++ x + |
+
+function Exp(x: real): real;
++ x + |
+
+function Ln(x: real): real;
++ x + |
+
+function Log2(x: real): real;
++ x 2 + |
+
+function Log10(x: real): real;
++ x + |
+
+function LogN(base,x: real): real;
++ x base + |
+
+function Sqrt(x: real): real;
++ x + |
+
+function Sqr(x: integer): int64;
++ x + |
+
+function Sqr(x: longword): uint64;
++ x + |
+
+function Sqr(x: int64): int64;
++ x + |
+
+function Sqr(x: uint64): uint64;
++ x + |
+
+function Sqr(x: real): real;
++ x + |
+
+function Power(x,y: real): real;
++ x y + |
+
+function Round(x: real): integer;
++ x, + |
+
+function Trunc(x: real): integer;
++ x + |
+
+function Int(x: real): real;
++ x + |
+
+function Frac(x: real): real;
++ x + |
+
+function Floor(x: real): integer;
++ , x + |
+
+function Ceil(x: real): integer;
++ , x + |
+
+
+function RadToDeg(x: real): real;
++ |
+
+function DegToRad(x: real): real; + + |
+
+procedure Randomize;
++ + |
+
+procedure Randomize(seed: integer);
++ , seed. seed + |
+
+function Random(maxValue: integer): integer;
++ 0 maxValue-1 + |
+
+function Random(a,b: integer): integer;
++ a b + |
+
+function Random: real;
++ [0..1) + |
+
+function Max(a,b: integer): integer;
++ a,b + |
+
+function Max(a,b: longword): longword;
++ a,b + |
+
+function Max(a,b: int64): int64;
++ a,b + |
+
+function Max(a,b: uint64): uint64;
++ a,b + |
+
+function Max(a,b: real): real;
++ a,b + |
+
+function Min(a,b: integer): integer;
++ a,b + |
+
+function Min(a,b: longword): longword;
++ a,b + |
+
+function Min(a,b: int64): int64;
++ a,b + |
+
+function Min(a,b: uint64): uint64;
++ a,b + |
+
+function Min(a,b: real): real;
++ a,b + |
+
+procedure Read(a,b,...);
++ a,b,... + |
+
+procedure Readln(a,b,...);
++ a,b,... + |
+
+function ReadInteger: integer; + integer, + |
+
+function ReadReal: real; + real, + + |
+
+function ReadString: string; + string, + + |
+
+function ReadChar: char; + char, + + |
+
+function ReadBoolean: boolean; + boolean, + + |
+
+function ReadlnInteger: integer; + integer, , + + |
+
+function ReadlnReal: real; + real, +, + |
+
+function ReadlnString: string; + string, +, + |
+
+function ReadlnChar: char; + char, +, + |
+
+function ReadlnBoolean: boolean; + boolean, +, + |
+
+function ReadInteger(prompt: string): integer; + + integer, + |
+
+function ReadReal(prompt: string): real; + + real, + + |
+
+function ReadString(prompt: string):
+ string; + + string, + + |
+
+function ReadChar(prompt: string): char; + + char, + + |
+
+function ReadBoolean(prompt: string):
+ boolean; + + boolean, + + |
+
+function ReadlnInteger(prompt: string): integer; + + integer, , + + |
+
+function ReadlnReal(prompt: string):
+ real;+ + real, +, + |
+
+function ReadlnString(prompt: string):
+ string; + + string, +, + |
+
+function ReadlnChar(prompt: string):
+ char; + + char, +, + |
+
+function ReadlnBoolean(prompt: string):
+ boolean; + + boolean, +, + |
+
+ function ReadSeqInteger(n: integer): array of
+ integer; + n , + |
+
+ function ReadSeqReal(n: integer): array of real;
+ + n , + |
+
+ function ReadSeqString(n: integer): array of
+ string; + n , + |
+
+ function ReadSeqInteger(const
+ prompt: string; n: integer): array of integer; + n + , + |
+
+ function ReadSeqReal(const
+ prompt: string; n: integer): array of real; + n + , + |
+
+ function ReadSeqString(const prompt:
+ string; n: integer): array of string; + n , + + |
+
+procedure Read(f: Text; a,b,...);
++ a,b,... f + |
+
+procedure Readln(f: Text; a,b,...);
++ a,b,... f + |
+function ReadInteger(f: Text): integer;
++ integer, f |
+
+function ReadReal(f: Text):
+integer; + real, + f |
+
+function ReadString(f: Text):
+integer; + string, + f |
+
+function ReadChar(f: Text):
+integer; + char, + f |
+
+function ReadBoolean(f: Text):
+integer; + boolean, + f |
+
+
+procedure Readln(f: file of T; a,b,...);
++ a,b,... f + |
+
+procedure Readln(f: file; a,b,...);
++ a,b,... f + |
+
+procedure Write(a,b,...);
++ a,b,... . + +
+ ToString
+ |
+
+
+procedure WriteFormat(formatstr: string; a,b,...);
++ a,b,... + formatstr + |
+
+procedure Writeln(a,b,...);
++ a,b,... + |
+
+procedure WritelnFormat(formatstr: string; a,b,...);
++ a,b,... + formatstr + |
+
+
+procedure Print(a,b,...);
++ a,b,... , + |
+
+
+procedure Println(a,b,...);
++ a,b,... , + , |
+
+
+procedure Write(f: Text; a,b,...);
++ a,b,... f + |
+
+procedure WriteFormat(f: Text; formatstr: string; a,b,...);
++ a,b,... + f formatstr + |
+
+
+procedure Writeln(f: Text; a,b,...);
++ a,b,... f + |
+
+procedure WritelnFormat(f: Text; formatstr: string; a,b,...);
++ a,b,... + f formatstr + |
+
+
+procedure Write(f: file of T; a,b,...);
++ a,b,... f + |
+
+procedure Write(f: file; a,b,...);
++ a,b,... f + |
+
+procedure Print(f: Text; a,b,...);
++ a,b,... + , + |
+
+
+procedure Println(f: Text; a,b,...);
++ a,b,... + , + , |
+
+ function Range(a,b: integer): sequence of
+ integer; + a b |
+
+ function Range(c1,c2: char): sequence of
+ char; + c1 c2 |
+
+ function Range(a,b: real; n: integer):
+ sequence of real; + + [a,b] n |
+
+ function Range(a,b,step: integer):
+ sequence of integer; + a b step |
+
+ function Seq<T>(params a:
+ array of T): sequence of T; + |
+
+ function SeqGen<T>(count: integer; first: T; next: T->T): sequence of T; + count , + first, next |
+
+ function SeqGen<T>(count: integer; first,second: T; next:
+ (T,T)->T): sequence of T; + count , + first second, next |
+ function SeqFill<T>(count: integer; x: T):
+ sequence of T; + count x |
+ function SeqGen<T>(count: integer; f:
+ integer->T): sequence of T; + count , + f(i) |
+
+ function SeqWhile<T>(first: T; next: T->T; pred:
+ T->boolean): sequence of T; + + first, next + pred |
+
+ function SeqWhile<T>(first,second: T; next: (T,T)->T;
+ pred: T->boolean): sequence of T; + , first + second, next + pred |
+ function SeqRandom(n: integer := 10; a: integer := 0;
+ b: integer := 100): sequence of integer; + n |
+ function SeqRandomReal(n: integer := 10; a: real :=
+ 0; b: real := 10): sequence of real; + n |
+
+ function ReadSeqInteger(n: integer):
+ sequence of integer; + n , |
+
+ function ReadSeqInteger(const
+ prompt: string; n: integer): sequence of integer; + n + , |
+
+ function ReadSeqReal(n: integer): sequence of
+ real; + n , + |
+
+ function ReadSeqReal(const prompt: string; n:
+ integer): sequence of real; + n + , |
+
+ function ReadSeqString(n: integer): sequence of
+ string; + n , |
+
+ function ReadSeqString(const prompt:
+ string; n: integer): sequence of string; + + n , + |
+
+function Chr(a: byte): char;
++ + |
+
+function ChrUnicode(a: word): char;
++ Unicode + ( Chr) |
+
+
+function ChrAnsi(a: word): char;
++ Windows |
+
+function Ord(a: char): word;
++ + |
+
+
+function OrdUnicode(a: char): word;
++ Unicode + ( Ord) + |
+
+
+function OrdAnsi(a: char): word;
++ Windows |
+
+function/b> UpperCase(ch: char): char;
++ + |
+
+function LowerCase(ch: char): char;
++ + |
+
+function UpCase(ch: char): char;
++ + |
+
+function LowCase(ch: char): char;
++ + |
+
+function Pos(subs,s: string): integer;
++ subs s. , 0 + |
+
+function PosEx(subs,s: string; from: integer := 1): integer;
++ subs s from. , 0 + |
+
+function Length(s: string): integer;
++ + |
+
+procedure SetLength(var s: string; n: integer);
++ s n + |
+
+procedure Insert(source: string; var s: string; index: integer);
++ source s index + |
+
+procedure Delete(var s: string; index,count: integer);
++ s count index + |
+
+function Copy(s: string; index,count: integer): string;
++ s count index + |
+
+function Concat(s1,s2,...: string): string;
++ , s1,s2,... + |
+
+function Concat(s1,s2: string): string;
++ , s1 s2 + |
+
+function LowerCase(s: string): string;
++ + |
+
+function UpperCase(s: string): string;
++ + |
+
+function StringOfChar(ch: char; count: integer): string;
++ , count ch + |
+
+function ReverseString(s: string): string;
++ + |
+
+function CompareStr(s1,s2: string): integer;
++ . < 0 s1 |
+
+function LeftStr(s: string; count: integer): string;
++ count s + |
+
+function RightStr(s: string; count: integer): string;
++ count s + |
+
+function Trim(s: string): string;
++ + |
+
+function TrimLeft(s: string): string;
++ + |
+
+function TrimRight(s: string): string;
++ + |
+
+function Format(fmtstr: string; params pars: array of object): string;
++ , fmtstr pars + |
+
+function StrToInt(s: string): integer;
++ + |
+
+function StrToInt64(s: string): int64;
++ + |
+
+function StrToFloat(s: string): real;
++ + |
+
+function TryStrToInt(s: string; var value: integer): boolean;
++ s value. False + |
+
+function TryStrToInt64(s: string; var value: int64): boolean;
++ s value. False + |
+
+function TryStrToFloat(s: string; var value: real): boolean;
++ s value. False + |
+
+function TryStrToFloat(s: string; var value: single): boolean;
++ s value. False + |
+
+procedure Val(s: string; var value: integer; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: shortint; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: smallint; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: int64; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: byte; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: word; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: longword; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: uint64; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: real; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Val(s: string; var value: single; var err: integer);
++ s value. , err=0, err>0 + |
+
+procedure Str(i: integer; var s: string);
++ i s + |
+
+procedure Str(r: real; var s: string);
++ r s + |
+
+function IntToStr(a: integer): string;
++ + |
+
+function IntToStr(a: int64): string;
++ + |
+
+function FloatToStr(a: real): string;
++ + |
+ function ReadLines(path: string):
+ sequence of string; + + + |
+
+ function ReadLines(path: string; en: Encoding):
+ sequence of string; + en + + |
+
+ function ReadAllLines(path: string):
+ array of string; + + |
+
+ function ReadAllLines(path: string; en:
+ Encoding): array of string; + en + |
+
+ function ReadAllText(path: string): string;
+ + + |
+
+ function ReadAllText(path: string; en: Encoding):
+ string; + en |
+
+
+ procedure WriteLines(path: string; ss: sequence
+ of string);
++ , + + |
+
+
+ procedure WriteLines(path: string; ss: sequence
+ of string; en: Encoding);
++ en, + + |
+
+
+ procedure WriteAllLines(path: string; ss: array
+ of string);
++ , + |
+
+
+ procedure WriteAllLines(path: string; ss: array
+ of string; en: Encoding);
++ en, + + |
+
+
+ procedure WriteAllText(path: string; s: string);
++ , + |
+
+
+ procedure WriteAllText(path: string; s: string; en:
+ Encoding);
++ en, + + |
+
+ function EnumerateFiles(path: string;
+ searchPattern: string := '*.*'): sequence of string;
+ + , + + |
+
+ function EnumerateAllFiles(path: string;
+ searchPattern: string := '*.*'): sequence of string;
+ + , + , + |
+
+ function EnumerateDirectories(path: string):
+ sequence of string; + + |
+
+ function EnumerateAllDirectories(path: string):
+ sequence of string; + , + + |
+
+
+function GetDir: string;
++ + |
+
+procedure ChDir(s: string);
++ + |
+
+procedure MkDir(s: string);
++ + |
+
+procedure RmDir(s: string);
++ + |
+
+function CreateDir(s: string): boolean;
++ . True, + |
+
+function DeleteFile(s: string): boolean;
++ . , False + |
+
+function GetCurrentDir: string;
++ + |
+
+function RemoveDir(s: string): boolean;
++ . True, + |
+
+function RenameFile(name, newname: string): boolean;
++ name, newname. True, + |
+
+function SetCurrentDir(s: string): boolean;
++ . True, + + |
+
+function ChangeFileNameExtension(name,newext: string): string;
++ name newext + |
+
+function FileExists(name: string): boolean;
++ True, name + |
+
+function DiskFree(diskname: string): int64;
++ diskname + |
+
+function DiskSize(diskname: string): int64;
++ diskname + |
+
+function DiskFree(disk: integer): int64;
++ disk. disk=0 - , disk=1 - A: , disk=2 - B: .. + |
+
+function DiskSize(disk: integer): int64;
++ disk. disk=0 - , disk=1 - A: , disk=2 - B: .. + |
+
+shortstring = string[255] |
+
+ PBoolean
++ boolean
+ |
+
+ PByte
++ byte
+ |
+
+ PShortint
++ shortint
+ |
+
+ PChar
++ char
+ |
+
+ PSmallint
++ smallint
+ |
+
+ PWord
++ word
+ |
+
+ PPointer
++ pointer
+ |
+
+ PInteger
++ integer
+ |
+
+ PLongword
++ longword
+ |
+
+ PLongint
++ longint
+ |
+
+ PInt64
++ int64
+ |
+
+ PUInt64
++ uint64
+ |
+
+ PSingle
++ single
+ |
+
+ PReal
++ real
+ |
+
+ PDouble
++ double
+ |
+ List<T> |
+ Stack<T> + - , " + - " |
+ Queue<T> + - , " + - " + |
+ LinkedList<T> + + |
+ LinkedListNode<T> + + |
+
+ HashSet<T> + + |
+
+ SortedSet<T> + + |
+
+ Dictionary<Key,Value> + ( -), + - + |
+
+ SortedDictionary<Key,Value> + ( -), + + |
+
+ SortedList<Key,Value> + ( -), + + |
+
+ KeyValuePair<Key,Value> + - + |
+
+ IEnumerable<T> + , + + |
+
+ IEnumerator<T> + + |
+
+ IComparer<T> + + |
+
+ Comparer<T> + IComparer<T> + |
+
+ IEqualityComparer<T> + + |
+
+ EqualityComparer<T> + IEqualityComparer<T> |
+shortstring = string[255] |
+ DateTime + |
+ Tuple + + |
+
+ StringBuilder
++ + |
+ Encoding + + |
+
+ TextFile + text + |
+ PBoolean + boolean
+ |
+
+ PByte + byte
+ |
+
+ PShortint + shortint
+ |
+
+
+ PChar
++ char
+ |
+
+
+ PSmallint
++ smallint
+ |
+
+ PWord
++ word
+ |
+
+ PPointer
++ pointer
+ |
+
+ PInteger
++ integer
+ |
+
+ PLongword
++ longword
+ |
+
+ PLongint
++ longint
+ |
+
+ PInt64
++ int64
+ |
+
+ PUInt64
++ uint64
+ |
+
+ PSingle
++ single
+ |
+
+ PReal
++ real
+ |
+
+ PDouble
++ double
+ |
+ Action0 |
+ Action<T> + + |
+ Action2<T1,T2> + + |
+ Action3<T1,T2,T3> + + |
+ Func0<Res> + + |
+ Func<T,Res> + + |
+ IntFunc = Func<integer,integer> + , + + |
+ RealFunc = Func<real,real> + , + + |
+ StringFunc = Func<string,string> + , + + |
+ Func2<T1,T2,Res> + + |
+ Func3<T1,T2,T3,Res> + + |
+ Predicate<T> + , boolean + |
+ Predicate2<T1,T2> + , boolean + |
+ Predicate3<T1,T2,T3> + , boolean + |
+ Regex + |
+
+ Match + + |
+
+ MatchEvaluator + , + Regex.Replace |
+
+ MatchCollection + |
+
+ RegexOptions + |
+ RegexGroup + Regex.Match |
+ RegexGroupCollection + Regex.Match |
PABCSystem + . +, , , , , .
+
+ ( file, file of T)
+ :
+ function FilePos: int64; + + |
+
+ function FileSize: int64; + |
+
+ procedure Seek(n: int64); + + n |
+
+ procedure Truncate; + , + |
+ (Text,
+file,
+
+file of T)
+ :
+ procedure Write(a,b,...); + a, b, ... + |
+
+ function Name: string; + |
+
+ function FullName: string; + |
+
+ function Eof: boolean; + True, , False + |
+
+ procedure Close; + |
+
+ procedure Erase; + |
+
+ procedure Rename(newname: string); + , newname |
+
+ ( Text)
+ :
+ procedure Writeln(a,b,...); + a, b, ... + |
+
+ function ReadInteger: integer; + integer, |
+
+ function ReadReal: real; + real, |
+
+ function ReadChar: char; + char, |
+
+ function ReadString: string; + string, , + |
+
+ function ReadBoolean: boolean; + boolean, |
+
+ function ReadlnInteger: integer; + integer, , + |
+
+ function ReadlnReal: real; + real, , + |
+
+ function ReadlnChar: char; + char, , + |
+
+ function ReadlnString: string; + string, , + |
+
+ function ReadlnBoolean: boolean; + boolean, , + |
+
+ function Eoln: boolean; + True, , False + |
+
+ function SeekEof: boolean; + , True, + |
+
+ function SeekEoln: boolean; + , True, + |
+
+ procedure Flush; + |
+
+ function ReadToEnd: string; + + |
+
. + . + , , + . + .
+:
+++ + + + diff --git a/PABCNetHelp/LangGuide/ProcFunc/external.html b/PABCNetHelp/LangGuide/ProcFunc/external.html new file mode 100644 index 000000000..10c005f8d --- /dev/null +++ b/PABCNetHelp/LangGuide/ProcFunc/external.html @@ -0,0 +1,35 @@ + + + + + ++
procedure PrintTwo(a,b: integer; delim: char + := ' ');
+ begin
+ write(a,delim,b);
+ end;+
...
+ PrintTwo(3,5);
+ PrintTwo(4,2,';');
dll +( , .NET-) + :
++++
external 'dll' + name 'dll';
:
++++
function MessageBox(h: integer; m,c: string; t: integer): + integer;
+ external 'User32.dll' name 'MessageBox'; +
+ ...
+ MessageBox(0,'Hello!','',0);
+
+ + + diff --git a/PABCNetHelp/LangGuide/ProcFunc/forward.html b/PABCNetHelp/LangGuide/ProcFunc/forward.html new file mode 100644 index 000000000..a02ab3ad3 --- /dev/null +++ b/PABCNetHelp/LangGuide/ProcFunc/forward.html @@ -0,0 +1,45 @@ + + + + + +
+, . ,
+ ( A
+ B,
+ A).
+ , ,
+ forward.
+:
++++procedure B(i: integer); forward; +procedure A(i: integer); +begin + ... + B(i-1); +end; +procedure B(i: integer); +begin + ... + A(i div 2); +end;+
+ .
+ forward .
+, ,
+.
, , + . , , + .
+.
+, + , + . :
+++ + + + diff --git a/PABCNetHelp/LangGuide/ProcFunc/overloading.html b/PABCNetHelp/LangGuide/ProcFunc/overloading.html new file mode 100644 index 000000000..f17af31dd --- /dev/null +++ b/PABCNetHelp/LangGuide/ProcFunc/overloading.html @@ -0,0 +1,144 @@ + + + + + +++var i: real; +procedure p; +var i: integer; +begin + // i + i:=5; // i; ... +end;+
+ , + . ,
++++
procedure p(b: byte);
+ begin
end;
+ procedure p(r: real);
+ begin
end;
p(1.0)
+ real (
+), p(1)
+ byte (
+ integer
+ byte).
, , Object Pascal,
+ overload .
+ , . , + , + . +,
++++
procedure p(i: integer; r: real);
+ begin
end;
+ procedure p(r: real; i: integer);
+ begin
end;
p(1,2)
+ , .
+ , , + . ,
+++ ++
procedure p(i: integer);
+++
procedure p(var i: integer);
.
++ , .. + .
++, . + , .
+
+
+
+. ,
+, uses,
+ . ,
+ (, ,
+ ), ,
+ . ,
+ , ,
+ , .
, -
+un1 un2:
main.pas
++++
uses un2,un1;+
procedure p(i: integer);
+ begin
+ write(1);
+ end;+
begin
+ p(2.2);
+ p(2);
+ end.
un2.pas
++++
unit un2;+
procedure p(r: real);
+ begin
+ write(3);
+ end;+
end.
un1.pas
++++
unit un1;+
procedure p(r: real);
+ begin
+ write(2);
+ end;+
end.
21,
+ , p
+ un1.
:
+ ,
+.. Object, ,
+, (
+).
+.
+ ;
+
+ Object.
+ , , +. ,
++++
procedure p(i: integer);
+ begin
+ write(1);
+ end;+
procedure p(params a: array of + integer);
+ begin
+ write(2);
+ end;+
begin
+ p(1)
+ end.
.
+
, +, . , +, .
+
+
+var const, - ,
+ .
+ var const,
+ - ,
+
+. PascalABC.NET
+ - .
, :
+
+ procedure PrintSquare(i: integer);
+ begin
+ writeln(i*i);
+ end;
+ PrintSquare(5*a-b) 5*a-b i,
+ ., + + . +- + . - +, + .
+,
+
+ procedure Mult2(var
+ a: integer);
+ begin
+ a := a*2;
+ end;
+ Mult2(d) d 2 .- + , + . - + , + .
+
+. (, , ),
+ .
+, , .
+ ,
+var, - const:
:
+++type
+ Person = record
+ name: string;
+ age,height,weight: integer;
+ end;+
procedure Print(const p: Person);
+ begin
+ write(p.name,' ',p.age,' ',p.height,' ',p.weight);
+ end;+
procedure IncAge(var p: Person);
+ begin
+ Inc(p.age);
+ end;
+ .
+, + - + . , +
++++
procedure p(a: array of integer);
+ begin
+ a[1] := 2;
+ end;+
var b: array of integer := (1,1);+
begin
+ p(b);
+ writeln(b[1]);
+ end.
2. + + :
+++ + + diff --git a/PABCNetHelp/LangGuide/ProcFunc/procdef.html b/PABCNetHelp/LangGuide/ProcFunc/procdef.html new file mode 100644 index 000000000..fa7266a80 --- /dev/null +++ b/PABCNetHelp/LangGuide/ProcFunc/procdef.html @@ -0,0 +1,136 @@ + + + + + ++
procedure q(var a: array of integer);
+ begin
+ SetLength(a,10);
+ end;
+, , + . , , + , + . +.
++ .
+:
++++
procedure(+);
+
+ begin
+
+ end;
:
++++
function(+): +;
+
+ begin
+
+ end;
,
+ begin/end,
+ .
+ .
+, ";".
+ , ,
+ .
+ var const, ,
+ (.. ).
+ , ,
+ , (
+ ).
+ , +. + + , ( - + ) + + . + .
++. , + : +.
+:
++++
procedure DoAdd(a,b: real; var res: real);
+ begin
+ res := a + b;
+ end;
. + + :
+++ ++
+ begin
+ var x := ReadInteger;
var + y := ReadInteger;
var res: integer;
DoAdd(x,y,res);
+ Print(res);
DoAdd(2*x,y,res);
Print(res); +
end;
Result,
+ .
+ . :
+++
function Sum(a,b: real): real;
+ begin
+ Result := a + b;
+ end;+
function MinElement(a: + array of real): real;
+ begin
+ Result := real.MaxValue;
+ foreach var x in + a do
+ if x < Result then +
+ Result := x;
+ end;+
begin
var a := Seq(1,5,3);
+ writeln(MinElement(a) + Sum(2,3));
end.
Result
+, .
PascalABC.NET + :
++++
procedure WriteStar := write('*');
, :
++++
function Add(a,b: real): real := a + b;
:
+++ + + diff --git a/PABCNetHelp/LangGuide/ProcFunc/variableparams.html b/PABCNetHelp/LangGuide/ProcFunc/variableparams.html new file mode 100644 index 000000000..c215bffa6 --- /dev/null +++ b/PABCNetHelp/LangGuide/ProcFunc/variableparams.html @@ -0,0 +1,46 @@ + + + + + ++
function Add(a,b: real) := a + b;
, ,
+ params,
+ . :
+ function Sum(params a: array of integer): integer;
+
+ begin
+
+
+ Result := 0;
+
+ for i: integer := 0 to a.Length do
+
+
+ Inc(Result,a[i]);
+
+ end;
+
+
+ params
+
+ , :
+++
var s: integer := Sum(1,2,3,4,5);
+ s := s + Sum(6,7);
params
+ , ,
+ . params .
+
+
+
diff --git a/PABCNetHelp/LangGuide/Types/arrays.html b/PABCNetHelp/LangGuide/Types/arrays.html
new file mode 100644
index 000000000..f658dea2e
--- /dev/null
+++ b/PABCNetHelp/LangGuide/Types/arrays.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+, + , ( +, ).
+ +PascalABC.NET + .
+ + + diff --git a/PABCNetHelp/LangGuide/Types/boolean.html b/PABCNetHelp/LangGuide/Types/boolean.html new file mode 100644 index 000000000..ae80de3d3 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/boolean.html @@ -0,0 +1,41 @@ + + + + + +
+boolean 1 ,
+ True ()
+ False ().
:
++++
boolean.Parse(s)- + ,+ boolean. , + ;+
boolean.TryParse(s,res)- + ,+ boolean+ res. , +True, - +False.
,
+ ToString,
+ boolean.
. ,
+False<True, Ord(False)=0, Ord(True)=1.
+ + + diff --git a/PABCNetHelp/LangGuide/Types/char.html b/PABCNetHelp/LangGuide/Types/char.html new file mode 100644 index 000000000..b92e511a2 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/char.html @@ -0,0 +1,75 @@ + + + + + +
char
+ 2 Unicode-.
+ System.Char
+ .NET.
+
+ () . : 'a'+'b'
+= 'ab'. , ,
+ :
var s: string := ' '+15; // s = ' 15'
+var s1: string := 15+' '; // s = '15 '
< > <= +>= = <>, :
+'a'<'b' // True
'2'<'3' // True
Windows (CP1251)
+
+Chr Ord:
+++
Chr(n)- , +n+ Windows;- ,
+ Ord()byte, +c+ Windows.
Unicode
+
+ChrUnicode OrdUnicode:
+++
ChrUnicode(w)- +w+ Unicode;-
+ OrdUnicode()word, + +c+ Unicode.
, #
+Unicode- (
+ 0 65535).
:
+++ ++
char(w)w+ Unicode;+
+ word()c+ Unicode.
char.
char
+PascalABC.NET .
| + | + |
char.IsDigit(c: char): boolean |
+ , | +
char.IsLetter(c: char): boolean |
+ , | +
char.IsWhiteSpace(c: char): boolean |
+ , | +
char.IsUpper(c: char): boolean |
+ , | +
char.IsLower(c: char): boolean |
+ , | +
char.IsPunctuation(c: char): boolean |
+ , | +
char.IsLetterOrDigit(c: char): boolean |
+ , | +
char.ToLower(c: char): char |
+ , | +
char.ToUpper(c: char): char |
+ , | +
:
++++
array of( + )
+array [,] of+ ( )
+ ..
. + ( ). +
+ .
+ new :
+++
var
+ a: array of integer;
+ b: array [,] of real;
+ begin
+ a := new integer[5];
+ + b := new real[4,3];
+ end.
, + :
++++
var
a: array of integer := new integer[5];
+ b: array [,] of real := new real[4,3];
- :
++++
var
a := new integer[5];
+ b := new real[4,3];
SetLength:
+++
SetLength(a,10);
+ SetLength(b,5,3);
.
+ SetLength ,
+ .
+ new:
++++
a := new integer[3](1,2,3);
+ b := new real[4,3] ((1,2,3),(4,5,6),(7,8,9),(0,1,2));
+ :
++++
var
+ a: array of integer := (1,2,3);
+ b: array [,] of real := ((1,2,3),(4,5,6),(7,8,9),(0,1,2)); +
+ c: array of array of integer := + ((1,2,3),(4,5),(6,7,8));
+.
++ Seq..., + :
++++
var a := Arr(1,3,5,7,8); + // array of integer
var s := + Arr('','',''); // array of string
var + b := ArrFill(777,5); + // b = [777,777,777,777,777]
var r := ArrRandom(10); + // 10 0 99
:
++++
var a := Arr(Arr(1,3,5),Arr(7,8),Arr(5,6)); // + array of array of integer
(n-
+ ). ( )
+Length Length:
+++
l := Length(a);
+ l := a.Length;
+ Length GetLength(i):
+++
l := Length(a,0);
+ l := + a.GetLength(0);
+ :
+for var i:=0 to a.Length-1
+ do
read(a[i]);
++ ReadSeqInteger:
+var a := ReadSeqInteger(10);
+.
+write , + :
+var a := Arr(1,3,5,7,9);
+ writeln(a); // [1,3,5,7,9]
+
+n- , + :.
+var m := new integer[3,3]
+ ((1,2,3),(4,5,6),(7,8,9));
writeln(m); //
+ [[1,2,3],[4,5,6],[7,8,9]]
+Print +Println:
++++
a.Println;
, , + Print, . :
++++
a.Print(NewLine);
.
++
+++
var : array of array of + integer;
+SetLength:
+++
SetLength(,5);
+ for i := 0 to 4 do
+ SetLength(c[i],3);
new
+ array of integer:
+++
type IntArray = array of integer;
+ var : array of IntArray;
+ ...
+ c := new IntArray[5];
+ for i := 0 to 4 do
+ c[i] := new integer[3];
+ :
++++
var
+ c: array of array of integer := + ((1,2,3),(4,5),(6,7,8));
, +- :
+++ ++
var a1: array of integer;
+ var a2: array of integer;
+ a1 := a2;
,
+ Copy:
+++
a1 := Copy(a2);
, .. + :
++++
procedure Squares(a: array of + integer);
begin
for var i:=0 + to a.Length-1 do
+ a[i] := Sqr(a[i]);
end;
begin
+ var a := Arr(1,3,5,7,9);
Squares(a);
+ end.
: + . , + SetLength:
+++ + + ++
procedure Add(var a: + array of integer; x: integer);
begin
+ SetLength(a,a.Length+1);
a[a.Length-1] := x;
end;
+
begin
var a := + Arr(1,3,5,7,9);
Add(a,666);
writeln(a);
end.
+ +
+ + + diff --git a/PABCNetHelp/LangGuide/Types/enum_subrange.html b/PABCNetHelp/LangGuide/Types/enum_subrange.html new file mode 100644 index 000000000..74600965c --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/enum_subrange.html @@ -0,0 +1,75 @@ + + + + + +.
++++
type typeName = (value1, value2, ..., valuen);
4 . value
+ typeName,
+ .
:
+++
type
+ Season = (Winter,Spring,Summer,Autumn);
+ DayOfWeek = (Mon,Tue,Wed,Thi,Thr,Sat,Sun);
,
+ typeName.value,
+ , :
+++
var a: DayOfWeek;
+ a := Mon;
+ a := DayOfWeek.Wed;
<:
++++
DayOfWeek.Wed < DayOfWeek.Sat
Ord,
+Pred Succ, Inc
+Dec. Ord
+ ,
+.
+ ToString,
+ . write .
:
++++
type Season = (Winter,Spring,Summer,Autumn);
+ var s: Season;
+ begin
+ s := Summer;
+ writeln(s.ToString); // Summer
+ writeln(s); // Summer
+ end.
,
+ a..b, a
+- , b -
+ , a<b:
+++
var
+ intI: 0..10;
+ intC: 'a'..'z';
+ intE: Mon..Thr;
, , + . + , .
+ + + diff --git a/PABCNetHelp/LangGuide/Types/equiv2.html b/PABCNetHelp/LangGuide/Types/equiv2.html new file mode 100644 index 000000000..651f3336e --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/equiv2.html @@ -0,0 +1,57 @@ + + + + +Pascal ABC + (), . ,
++++
type Arr=array [1..100] of integer;
+ var
+ a: Arr;
+ b: array [1..100] of integer;
:
++++
a:=b;
, , :
++++
type
+ rec1 = record i,j: integer end;
+ rec2 = record x,y: integer end;
+ ...
+ var r1: rec1; r2: rec2;
+ ...
+ r1:=r2; // !
+ :
++++
type
+ proc1 = procedure (i: integer);
+ proc2 = procedure (x: integer);
+ ...
+ var p1: proc1; p2: proc2;
+ ...
+ p1:=p2; //
( + Borland Pascal Borland Delphi) + (, , ) + , :
++++
procedure foreach(var a: array [1..100] of + real; n: integer; f: function(r: real): real);
var i: integer;
+ begin
for i:=1 to n do
a[i]:=f(a[i]);
+ end;
+ + + diff --git a/PABCNetHelp/LangGuide/Types/files.html b/PABCNetHelp/LangGuide/Types/files.html new file mode 100644 index 000000000..8f72ca887 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/files.html @@ -0,0 +1,54 @@ + + + + + +
+ , . +PascalABC.NET - + . , + #13#10 (Windows) + #10 (Linux). + NewLine. + +.
+
+ text,
+file,
+ file of
+ :
+++
var
+ f1: file of real;
+ f2: text;
+ f3: file;
+ , , , + .
++ +
, .NET +, .
+ + + diff --git a/PABCNetHelp/LangGuide/Types/index_types.html b/PABCNetHelp/LangGuide/Types/index_types.html new file mode 100644 index 000000000..9fafb362f --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/index_types.html @@ -0,0 +1,63 @@ + + + + + ++PascalABC.NET , +, , + , + +.
+ +, + .
+ + + , ,
+.
+ for.
+ , Ord,
+Pred Succ,
+ Inc Dec.
,
+ , Object.
+
+PascalABC.NET .NET.
+ void*.
PascalABC.NET : + + +.
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/Types/integer.html b/PABCNetHelp/LangGuide/Types/integer.html new file mode 100644 index 000000000..5f500b70d --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/integer.html @@ -0,0 +1,144 @@ + + + + + +, + .
++
| + | , | ++ |
shortint |
+ 1 | +-128..127 | +
smallint |
+ 2 | +-32768..32767 | +
integer, longint |
+ 4 | +-2147483648..2147483647 | +
int64 |
+ 8 | +-9223372036854775808..9223372036854775807 | +
byte |
+ 1 | +0..255 | +
word |
+ 2 | +0..65535 | +
longword, cardinal |
+ 4 | +0..4294967295 | +
uint64 |
+ 8 | +0..18446744073709551615 | +
BigInteger |
+ + | + |
integer longint,
+ longword cardinal
+ .
+ :
+
+ MaxInt64,
+
+ MaxInt,
+ MaxSmallInt,
+ MaxShortInt,
+
+ MaxUInt64,
+
+ MaxLongWord,
+
+ MaxWord,
+
+ MaxByte.
T
+ BigInteger
+ :
+++
T.MinValue- , +T;+
T.MaxValue- , +T;
T
+ :
+++
T.Parse(s)- , +T. + , ; ++
T.TryParse(s,res)- , +T+res. + ,True, + -False.
, T
+ ToString,
+ .
, + , + $:
+++ + + diff --git a/PABCNetHelp/LangGuide/Types/pointers.html b/PABCNetHelp/LangGuide/Types/pointers.html new file mode 100644 index 000000000..00092bf52 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/pointers.html @@ -0,0 +1,68 @@ + + + + + ++
25 3456 $FFFF
- , . +PascalABC.NET + ( ) + ( +, - ).
+ T ^T, :
+++
type pinteger = ^integer;
+ var p: ^record r,i: real end;
pointer.
, ,
+ ^:
+++
var
+ i: integer;
+ pi: ^integer;
+ ...
+ pi := @i; // i
+ pi^ := 5; // i 5
.
+:
++++
var
+ p: pointer;
+ pr: ^real;
+ ...
+ p := pr;
:
++++
pr := p;
+ pr^ := 3.14;
(=) (<>). , ,
+ nil ( ) :
+p := nil.
!
+.NET T
+
+ - (, ,
+ ).
+ : ,
+ . , ,
+ ,
+ .
+, . ,
+, .
, , +, - . + - +() .
++ . :
++++
type
+ ProcI = procedure (i: integer);
+ FunI = function (x,y: integer): integer;
+, :
++++
function Mult(x,y: integer): integer;
+ begin
+ Result := x*y;
+ end;+
var f: FunI := Mult;
+- + :
++++
var f2: FunI := (x,y) -> x+2*y;
+ , :
++++
write(f(2)); // 8
write(f2(3)); // 10
+ +. :
++++
var f3: IntFunc := x -> 2*x-1;
var + f4: Func<integer,real> := x -> 2.5*x;
var f3: + Action<real> := x -> write(x,' ');
var pr: + Predicate<string> := s -> s.Length>0;
:
++++
() -> T; // + , T
T1 -> T; // c T1, T
(T1,T2) -> T // c T1 T2, T
(T1,T2,T3) -> T // + c T1, T2 T3, T
..
() -> + (); //
T1 -> + (); // c T1
+ (T1,T2) -> () // c T1 T2
+ (T1,T2,T3) -> () // c T1, T2 T3
..
+, .
+ ++ - +, :
++++
procedure forall(a: array of + real; f: real->real);
+ begin
+ for var i := 0 to a.Length-1 do
+ a[i] := f(a[i]);
+ end;+
...
+ forall(a,x->x*2); // 2
+ forall(a,x->x+3); // + 3
,
+ nil.
+ .
.NET.
+ , . /
+ +=
+-=:
+++
p1 += mult2;
+ p1 += add3;
+ forall(a,p1);
: +, .
+:
+++ + ++
p1 -= print;
++ ++
type
+ A = class
+ x0: integer := 1;
+ h: integer := 2;
+ procedure PrintNext;
+ begin
+ Print(x0);
x0 + *= h;
+ end;
+ end;+
begin
+ + var p: procedure;
+ var a1 := new A();
+ + p := a1.PrintNext;
for var i:=1 to + 10 do
+ + + p;
// 1 2 4 8 16 32 64 128 256 512
+ end.
+++
begin
+ + var x0 := 1;
+ var p: Action0 := procedure -> begin + Print(x0); x0 *= 2 end;
+ for var i:=1 to 10 do +
+ + + p;
end.
+
+
+ + + diff --git a/PABCNetHelp/LangGuide/Types/real.html b/PABCNetHelp/LangGuide/Types/real.html new file mode 100644 index 000000000..a369e5272 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/real.html @@ -0,0 +1,137 @@ + + + + + +
, , + :
+| + | , | + + |
+ + |
real |
+ 8 | +15-16 | +-1.8∙10308 .. 1.8∙10308 | +
double |
+ 8 | +15-16 | +-1.8∙10308 .. 1.8∙10308 | +
single |
+ 4 | +7-8 | +-3.4∙1038 .. 3.4∙1038 | +
decimal |
+ 16 | +28-29 | +-79228162514264337593543950335 .. + 79228162514264337593543950335 | +
real double . real 5.0∙10-324, single 1.4∙10-45.
+ : +MaxReal, MaxDouble +MaxSingle.
+ R
+ decimal
+ :
+++
R.MinValue- , +R;+
R.MaxValue- , +R;+
R.Epsilon- , ++ R;+
R.NaN- , (, , + 0/0);+
R.NegativeInfinity- , + + (, , -2/0);+
R.PositiveInfinity- , + + (, , 2/0).
R decimal
+ :
+++
R.IsNaN(r)-True, +rR.NaN,False+ ;+
R.IsInfinity(r)- +True,r+R.PositiveInfinity+R.NegativeInfinity, +False;+
R.IsPositiveInfinity(r)- +True,r+R.PositiveInfinity, +False;+
R.IsNegativeInfinity(r)- +True,r+R.NegativeInfinity, +False;
R
+ :
+++
R.Parse(s)- + , +R. , + ;+
R.TryParse(s,res)+ , +R+ res. , +True, - +False.
,
+ ToString,
+ R.
, +:
+++ + + diff --git a/PABCNetHelp/LangGuide/Types/records.html b/PABCNetHelp/LangGuide/Types/records.html new file mode 100644 index 000000000..122e55bed --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/records.html @@ -0,0 +1,214 @@ + + + + + ++
1.70.0132.5e3+ (2500)1.4e-1+ (0.14)
, + .
++ +:
+++ ++
record
+
+end
:
++++
type
+ Person = record
+ Name: string;
+ Age: integer;
+ end;
+.
+:
++++
var p: Person;
begin
+ p.Name := '';
+ p.Age := 20;
writeln(p); // (,20)
+ end.
write
+ .
PascalABC.NET + +, + . , + PascalABC.NET :
++++
record
+1
+2+ ...
+ end
:
+++ ++
+
++
:
++++
type
+ Person = record
+ private
+ Name: string;
+ Age: integer;
+ public
+ constructor Create(Name: string; Age: integer);
+ begin
+ Self.Name := Name;
+ Self.Age := Age;
+ end;
procedure + Print;
end;
procedure Person.Print;
+ begin
writelnFormat(': {0} : {1}', + Name, Age);
end;
, + , . + , Print , + . - Create + .
++ ( Delphi Object Pascal):
++++
const p: Person = (Name: ''; + Age: 18);
+++
var p: Person := (Name: ''; + Age: 20);
, . , + , + , :
++++
var p: Person := new Person('',20);
-, + Init, + :
++++
type
+ Person = record
...
+ public
+ procedure Init(Name: string; Age: integer);
+ begin
+ Self.Name := Name;
+ Self.Age := Age;
+ end;
...
end;
+ ...
var p: Person;
p.Init('',20);
Rec, + " ":
++++
var p := Rec('',20);
Println(p); // + (,20)
- . +Item1, Item2 ..:
++++
Println(p.Item1, p.Item2); // 20
+ :
+System.ValueType
+ struct-. write
+ . ,
+
+ToString Object -
+ .
:
++++
type
+ Person = record
+ + ...
+ function ToString: + string; override;
+ begin
+ Result := + string.Format(': {0} : {1}', + Name, Age);
+ end;
+ end;
+ ...
+ var p: Person := new Person('',20);
+ writeln(p); // : : 20
, , , - +:
+++ ++
d2 := d1;
, , + . , + , - :
++++
procedure PrintPerson(const p: + Person);
begin
Print(p.Name, p.Age);
+ end;
procedure ChangeName(var + p: Person; NewName: string);
begin
p.Name := + Name;
end;
, + :
+++ ++
type Person = record
+ name: string;
age: integer;
end;
+ var p1,p2: Person;
begin
+ p1.age := 20;
p2.age := 20;
p1.name := 'Ivanov';
+ p2.name := 'Ivanov';
writeln(p1=p2); // True
end.
Delphi Object Pascal, PascalABC.NET + .
+ + + diff --git a/PABCNetHelp/LangGuide/Types/sequences.html b/PABCNetHelp/LangGuide/Types/sequences.html new file mode 100644 index 000000000..a15190bbf --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/sequences.html @@ -0,0 +1,111 @@ + + + + + +- , + . + array of T, + List<T>, +LinkedList<T>, +HashSet<T> +SortedSet<T>.
+:
++++
sequence of
. + , +.
+sequence +of T .NET +System.Collections.Generic.IEnumerable<T>, - + , +System.Collections.Generic.IEnumerable<T>.
++ +Seq, SeqGen, +SeqFill, SeqWhile, +SeqRandom, +SeqRandomReal, ReadSeqInteger, +ReadSeqReal, +ReadSeqString. :
++++
var s: sequence of integer;
s := + Seq(1,3,5);
s.Println;
s := SeqGen(1,x->x*2,10);
writeln(s);
. + +.
+,
++++
var s := SeqFill(1,10000000);
writeln(s.Sum());
, + + s.
++, + . :
+
+ Seq(1,2,3) + Seq(5,6,7)
Seq(1,2,3) + Arr(5,6,7)
+, + + , +:
+
+ Seq(1,2,3) + 5
3 + Seq(5,6,7)
3 + Seq(5,6,7) + 9
++ +Concat.
+:
+
+ Seq(1,2,3) * 3
+1 2 3 : 1 2 3 1 2 3 1 2 3
++foreach:
++++
foreach var x in s do
if + x>2 then
Print(x);
""
+T
+array of T, List<T>,
+ LinkedList<T>,
+HashSet<T>
+SortedSet<T>, ,
+
+System.Collections.Generic.IEnumerable<T>.
:
+ ++ + + diff --git a/PABCNetHelp/LangGuide/Types/sets.html b/PABCNetHelp/LangGuide/Types/sets.html new file mode 100644 index 000000000..945daf205 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/sets.html @@ -0,0 +1,102 @@ + + + + + +
+. ; + . + :
++++
set of
, + .
+:
++++
type
+ ByteSet = set of byte;
+ StringSet = set of + string;
+ Digits = set of '0'..'9';
+ SeasonSet = set of (Winter,Spring,Summer,Autumn);
+ PersonSet = set of Person;
: +, , +- . , +, ( ).
+. + ,
++++
[]
+ , ( ) a..b,
+ a b
+- . :
+++
var
+ bs: ByteSet := [1,3,5,20..25];
+ fios: StringSet := ['','',''];
, :
++++
bs:=[];
.
+.
++ +. s := s1 s1 + , + s, .
+:
++++
var st: set of 3..9;
+ ...
+ st := [1..5,8,10,12]; // st + [3..5,8]
in
+ :
+++
if Wed in bestdays then ...
+ + (), -
+(), * (),
+= (), <>
+(), <= ( ), < ( ), >= (
+) > ( ).
write .
+,
+++
write(['','','']);
['','',''],
+, , .
+foreach,
+:
+++
foreach var s in fios do
+ write(s,' ');
x s
+ s += [x]
+Include: Include(s,x). x
+ s s -= [x]
+ Exclude: Exclude(s,x).
+ :
+++ ++
array [1,+ ...,+ N] of
+++
type
+ MyEnum = (w1,w2,w3,w4,w5);
+ Arr = array [1..10] of integer;
+ var
+ a1,a2: Arr;
+ b: array ['a'..'z',w2..w4] of string;
+ c: array [1..3] of array [1..4] of real;
:
++++
var
+ a: Arr := (1,2,3,4,5,6,7,8,9,0);
+ cc: array [1..3,1..4] of real := + ((1,2,3,4), (5,6,7,8), (9,0,1,2));
, + :
++++
a1 := a2;
write , + :
+var a: Arr := (1,2,3,4,5,6,7,8,9,0);
+ var m := array [1..3,1..3] of integer :=
+ ((1,2,3),(4,5,6),(7,8,9));
writeln(a); // [1,2,3,4,5]
writeln(m); //
+ [[1,2,3],[4,5,6],[7,8,9]]
++ - + - :
+++ ++
procedure p(a: Arr); // + - !
+ ...
+ p(a1);
+++
type Arr = array [2..10] + of integer;
procedure Squares(var + a: Arr);
begin
for + var i:= Low(a) to High(a) do
+ a[i] := Sqr(a[i]);
end;
procedure + PrintArray(const a: Arr);
begin
+ for var i:= Low(a) to + High(a) do
Print(a[i])
end;
+
var a: Arr := (1,3,5,7,9,2,4,6,8);
+ begin
Squares(a);
PrintArray(a);
end.
+ Low High.
+ + + diff --git a/PABCNetHelp/LangGuide/Types/string.html b/PABCNetHelp/LangGuide/Types/string.html new file mode 100644 index 000000000..2d62de236 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/string.html @@ -0,0 +1,90 @@ + + + + + + string,
+char .
. , :
+s[i] i-
+ , . i
+ , .
: < > <= +>= = <>. +: s1 < s2 + i s1[i]<s2[i] + , s1 +s2.
+ +
+ () . : ''+''
+= ''.
+=
+ - - . :
+++
var s: string := '';
+ s += ''; // s = ''
, + :
+s := ': '+15; // s = ': 15'
s :=
+20.5+''; // s = '20.5'
s += 1; // s = '20.51'
*: +s*n n*s + , s, + n :
+s := '*'*10; // s = '**********'
+s := 5*'ab' // s = 'ababababab'
s := 'd'; s *= 3; // s =
+'ddd'
System.String
+ .NET .
+ ,
+System.String. , .NET -
+, PascalABC.NET .
+, s[i] ( .NET
+). , string
+ PascalABC.NET
+:
+++
var s2 := 'Hello';
+ var s1 := s2;
+ s1[2] := 'a';
s2 .
+
+, .. , Delphi Object
+Pascal, .NET.
, nil,
+ NET-.
, PascalABC.NET
+ .
+string[n], n -
+ , . , ,
+ .
+Delphi Object Pascal
+shortstring=string[255].
string
+PascalABC.NET ,
+ , .
string
+, . ,
+, .. .NET .
| + | + |
s[i] |
+ . + i- s. + PascalABC.NET 1. + | +
Length: integer |
+ + |
| + | + |
String.Compare(s1,s2: string): integer |
+ s1 + s2. <0 + s1<s2, =0 s1=s2 + >0 s1>s2 | +
String.Compare(s1,s2: string; ignorecase: boolean):
+ integer |
+ . ignorecase=True, + | +
String.Format(fmtstr: string, params arr: array
+ of object): string; |
+ arr + fmtstr | +
String.Join(ss: array of string; delim:
+ string): string |
+ , + ss delim + | +
, , + , +. , , .
+| + | + |
Contains(s: string): boolean |
+ True, + s, False + | +
EndsWith(s: string): boolean |
+ True, + s, False + | +
IndexOf(s: string): integer |
+ + s -1 + | +
IndexOf(s: string; start,count: integer): integer |
+ + s -1 + . start + count | +
IndexOfAny(cc: array of char): integer |
+ + | +
Insert(from: integer; s: string): string |
+ , + s from | +
LastIndexOf(s: string): integer |
+ + s | +
LastIndexOf(s: string; start,count: integer): integer |
+ + s -1 + . start + count | +
LastIndexOfAny(a: array of char): integer |
+ + | +
PadLeft(n: integer): string |
+ , + + n | +
PadRight(n: integer): string |
+ , + + n | +
Remove(from,len: integer): string |
+ , + len from | +
Replace(s1,s2: string): string |
+ , + s1 + s2 | +
Split(params delim: array
+ of char):
+ array of string |
+ , + , + delim ( - ) | +
StartsWith(s: string): boolean |
+ True, + s, False + | +
Substring(from,len: integer): string |
+ + from len | +
ToCharArray: array of char |
+ + | +
ToLower: string |
+ , | +
ToUpper: string |
+ , | +
Trim: string |
+ , + | +
TrimEnd(params cc:
+ array of char): string |
+ , + cc | +
TrimStart(params cc:
+ array of char): string |
+ , + cc | +
- .NET, + PascalABC.NET.
+| + | + |
Inverse: string |
+ + |
Print |
+ , | +
Println |
+ , , + | +
ReadInteger(var from: integer):
+ integer |
+ from . + from | +
ReadReal(var from: integer): real |
+ from + . from | +
ReadWord(var from: integer):
+ string |
+ + from . from + | +
ToInteger: integer |
+ . + , | +
ToIntegers: array of integer |
+ , . + . , | +
ToReal: real |
+ + . , | +
ToReals: array of real |
+ , . + . , + | +
ToWords(params delim: array of
+ char): array of string |
+ , + , + delim ( - ). + s.Split . + , , + delim | +
- , +. , +. , . , + : + .
+System.Tuple .NET:
+
+ var t: System.Tuple<string,integer>;
+
+
+:
+
+ var t: (string,integer);
+
+. + - , , , - .
+ ++ . :
+
+ t := ('',23);
+
+:
+
+ var t1 := ('',(5,3,4)); // ,
+
+
+
+, + :
+
+ writeln(t); // (,23)
writeln(t1); // (,(5,3,4))
+
+() Item1, Item2 ..:
+
+ Print(t.Item1,t.Item2);
+
+:
+
+ Print(t[0],t[1]);
+
+.
+: :
+
+ t[1] := 20; //
+, + :
+
+ var t := ('',23);
var name:
+ string;
var age: integer;
(name,age) := t;
+
+, + , +. + :
+
+ name := t[0];
age := t[1];
+. +, a b, + :
+ +
+ (a,b) := (b,a);
+, + :
+ +
+ (a,b) := (1,2,3);
+:
+ +
+ (var a, var b) := (1,2);
+
+
+
+ var (a,b) := (1,2);
+. + + .
+, , , + :
+
+ function SP(a,b: real) := (a*b,2*(a+b));
+, + :
+
+ var (S,P) := SP(2,3);
++ + + + diff --git a/PABCNetHelp/LangGuide/Types/typecompatibility.html b/PABCNetHelp/LangGuide/Types/typecompatibility.html new file mode 100644 index 000000000..d8cc03f60 --- /dev/null +++ b/PABCNetHelp/LangGuide/Types/typecompatibility.html @@ -0,0 +1,117 @@ + + + + +
, T1
+T2 ,
+ type T1
+= T2. ,
+++
type
+ IntArray = array [1..10] of integer;
+ IntArrayCopy = IntArray;
+ var
+ a1: IntArray;
+ a2: IntArrayCopy;
+ b1,c1: array [1..15] of integer;
+ b2: array [1..15] of integer;
a1
+a2 b1
+ c1
+, b1 b2
+- .
, T1
+T2 ,
+ :
T1 T2
+ T1 T2
+ - T1 T2
+ - T1 T2
+ - T1 T2
+ - (
+ - )+ , , + . + , , + . + , PascalABC.NET + , , , + , + .
+ T1
+T2
+, T1
+ - T2.
, T1
+T2 ,
+ :
T1 T2 T1 T2
+ T1 T2
+ T1 T2
+ -
+ , T2
+ T1
+ T2
+ T1, :
T1 T2
+ T1 - , T2
+ - T1 - , T2
+ - T1 - pointer,
+ T2 - T1 - ,
+ T2=nilT1 - ,
+ T2 -
+ T1, T2
+ - , - .
+ PascalABC.NET
+ Object,
+ ( )
+ ObjectT1 - , T2
+ - , T2
+ T1,
+ , T2
+ T1.
PascalABC.NET + .NET. + PascalABC.NET + .NET.
++
| PascalABC.NET | +.NET | +
int64 |
+ System.Int64 |
+
uint64 |
+ System.UInt64 |
+
integer, longint |
+ System.Int32 |
+
longword, cardinal |
+ System.UInt32 |
+
| BigInteger | +System.BigInteger |
+
smallint |
+ System.Int16 |
+
word |
+ System.UInt16 |
+
shortint |
+ System.SByte |
+
byte |
+ System.Byte |
+
boolean |
+ System.Boolean |
+
real |
+ System.Double |
+
double |
+ System.Double |
+
char |
+ System.Char |
+
string |
+ System.String |
+
object |
+ System.Object |
+
array of T |
+ T[] |
+
record |
+ struct |
+
PascalABC.NET : +. , , +, , . +, , .
+: +, , . + : + , + .
++ . +.
++++
var i: integer; // i
+ i := 5;
+ . , + nil ( ). + :
+++ ++
type Person = auto class
+ name: string;
age: integer;
end;+
var p: Person; // p nil, +
p := new Person('',20); // +
. + , . +:
++++
var a,a1: array [1..1000000] + of integer;
a1 := a; // 1000000 +
+, + :
++++
var p1: Person;
p1 := p; //
. +, .
++++
type PersonRec = record
+ name: string;
age: integer;
end;
var p,p1: + PersonRec;
p.name := ''; p.age := 20;
p1.name := ''; + p1.age := 20;
writeln(p1=p); // True
, + .
++++
var p := new Person('',20);
var + p1 := new Person('',20);
writeln(p1=p); // False
, + . + . + . + .
+ ++ - . + , , + :
++++
type Arr = array [1..100] + of integer;
procedure + PrintArray(const a: Arr; n: integer);
begin
+ for var i:=1 to + n do
Print(a[i])
end;
, , . + , + .
++++
procedure + Change666(a: array of integer);
begin
+ a[0] := 666;
end;
+ +.
++ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/comments.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/comments.html new file mode 100644 index 000000000..08edb6f37 --- /dev/null +++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/comments.html @@ -0,0 +1,40 @@ + + + + + +
- , + .
+PascalABC.NET .
+ { } (*
+*) :
+++
{
+ }+
(*
+ *)
+ //
+ :
+++
var Version: integer; //
:
++++
{
+ (* *)}
+
+ + + diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/constdef.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/constdef.html new file mode 100644 index 000000000..1d3a27871 --- /dev/null +++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/constdef.html @@ -0,0 +1,44 @@ + + + + + +
+
+const,
+
+++=;+
+
++:+=;+
:
++++
const
+ Pi = 3.14;
+ Count = 10;
+ Name = 'Mike';
+ DigitsSet = ['0'..'9'];
+ Arr: array [1..5] of integer = (1,3,5,7,9);
+ Rec: record name: string; + age: integer end = (name: ''; + age: 23);
+ Arr2: array [1..2,1..2] of + real = ((1,2),(3,4));
+ + + diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/identifiers.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/identifiers.html new file mode 100644 index 000000000..8e87d18d6 --- /dev/null +++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/identifiers.html @@ -0,0 +1,60 @@ + + + + + +
_".,
+a1, _h, b123 - , 1a - .
+.
+, + +:
+and array as auto begin case class const constructor destructor div
+do downto else end event except extensionmethod file finalization finally for
+foreach function goto if implementation in inherited initialization interface is
+label lock loop mod nil not of operator or procedure program property raise record
+repeat sealed set sequence shl shr sizeof template then to try type typeof until
+uses using var where while with xor
+( ):
+abstract default external forward internal on overload override
+params private protected public read reintroduce unit virtual write
.
+.NET. + PascalABC.NET + +.
+. :
++++
var a: System.Array;
Array
+ System, array
+.
+& .
+. :
+++
uses System;
+ var a: &Array;
+ + diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/index_progrstruct.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/index_progrstruct.html new file mode 100644 index 000000000..33f7c48fa --- /dev/null +++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/index_progrstruct.html @@ -0,0 +1,85 @@ + + + + + +
PascalABC.NET :
++++
program ++;uses
+
begin
+
end.
+.
+
+
+uses
+
+uses,
+
+uses,
+ .NET, .
:
++ .
+ begin/end,
+ , "
+ ".
+
+, .
+uses
+ .
+
:
+
+ program MyProgram;
+ var
+ a,b: integer;
+ x: real;
+ begin
+ readln(a,b);
+ x := a/b;
+ writeln(x);
+ end.
+
+
+ uses GraphABC;
+ begin
+ var x := 100;
var y :=
+ 100;
var r := 50;
Circle(x,y,r);
+ end.
+
+
+
diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/labeldef.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/labeldef.html
new file mode 100644
index 000000000..aa2d3671c
--- /dev/null
+++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/labeldef.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ label,
+ , .
+ :
+ label a1,l2,777777;
+
+
+
+
diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/scope.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/scope.html
new file mode 100644
index 000000000..93497b2b0
--- /dev/null
+++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/scope.html
@@ -0,0 +1,126 @@
+
+
+
+
+
++ + . . + .
++ , , , +, + + - , + . , + ( + ). + , .NET + .
+
+
+ (.. , )
+ , . , , ,
+ ,
+uses.
+ , ,
+ (for, foreach).
+ i
+. , :
+++
var a: array of integer := (3,5,7);
+ for i: integer := 1 to 9 do
+ write(a[i]);
+ foreach i: integer in a do
+ write(i);
+ , , +, . ,
++++
var i: integer;+
procedure p;
+ var i: integer;
+ begin
+ i := 5;
+ end;
5 i,
+p; p
+ i
+.
, , , + . , +:
++++
var i: integer;
+ begin
+ var i: integer; //
+ end.
, , , ,
+ .
+
+
+inherited:
+++
type
+ A=class
+ i: integer;
+ procedure p;
+ begin
+ i := 5;
+ end;
+ end;
+ B=class(A)
+ i: integer;
+ procedure p;
+ begin
+ i := 5;
+ inherited p;
+ end;
+ end;
+: , , + , .
++ : + , , , + . ,
++++
uses unit1,unit2;
+ begin
+ id := 2;
+ end.
id
+, unit2, unit1.
+ id.
+ , unit1
+, unit2 ,
+ unit2.
- unit1 unit2
+- id,
+ ,
+.:
+++
uses unit1,unit2;
+ begin
+ unit1.id := 2;
+ end.
+ + + \ No newline at end of file diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/typesdef.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/typesdef.html new file mode 100644 index 000000000..36cacd8f9 --- /dev/null +++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/typesdef.html @@ -0,0 +1,97 @@ + + + + + +
+ type,
+
++,=;+
+++
type
+ arr10 = array [1..10] of integer;
+ myint = integer;
+ pinteger = ^integer;
IntFunc = function(x: + integer): integer;
( , + , , ) . + + , + . +
+ :
++++
type
A = class
+ i: integer;
+ constructor Create(ii: integer);
+ begin
+ i:=ii;
+ end;
+ end;
+, : +
+++
type
int = integer;
double = real;
, .. - + . +
+++
type
Dict<K,V> = Dictionary<K,V>;
+ Arr<T> = array of T;
- + :
+++
var
a: Arr<integer>;
d: + Dict<string,integer>;
+ :
+++
type
+ PNode = ^TNode;
+ TNode = record
+ data: integer;
+ next: PNode;
+ end;
,
+ type.
Delphi Object Pascal + :
++++
type
+ TNode = record
+ data: integer;
+ next: ^TNode;
+ end;
, () , + :
+++ + + diff --git a/PABCNetHelp/LangGuide/_ProgrStruct_Defs/vardef.html b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/vardef.html new file mode 100644 index 000000000..6380ef40d --- /dev/null +++ b/PABCNetHelp/LangGuide/_ProgrStruct_Defs/vardef.html @@ -0,0 +1,77 @@ + + + + + ++
type
+ Node = class
+ data: integer;
+ next: Node;
+ end;
,
+ begin/end.
+ var,
+
++ +:+;
++ +:+:=;+
++ +:+=;+// Delphi+
++:=+;+
. :
++++
var
+ a,b,c: integer;
+ d: real := 3.7;
+ s := 'PascalABC forever';
+ al := new List<integer>;
+p1 := 1;
+ .
++. + + .
+ +. + - .
+
+ var t := (1,2);
(var a, var b) := (1,2);
+
+
+
+ var (a,b) := (1,2);
++:
+++ + + diff --git a/PABCNetHelp/LangGuide/index_lang_guide.html b/PABCNetHelp/LangGuide/index_lang_guide.html new file mode 100644 index 000000000..f2322e8bc --- /dev/null +++ b/PABCNetHelp/LangGuide/index_lang_guide.html @@ -0,0 +1,113 @@ + + + + +function SP(a,b: real) := (a*b,2*(a+b));
+ ...
+var (S,P) := SP(2,3);+
PascalABC.NET - Pascal +, Pascal, + Delphi Object Pascal, , +, .NET-. +PascalABC.NET - + : , - +, .
+, .NET- + , Pascal.
+PascalABC.NET.
+ +'+f+''+NewLine+''+s.Item2+''+NewLine+' sequence of T.
';
+ sq := ''+sq+'';
+ sq := ''+f+''+NewLine+''+f+''+NewLine+' sequence of T.
+function Aggregate(func: (T,T)->T): T;
+. . + |
+function Aggregate<Accum>(seed: T; func: (Accum,T)->Accum): T;
+. . . + |
+function Aggregate<Accum,Res>(seed: T; func: (Accum,T)->Accum; resultSelector: Accum->Res): T;
+. , . . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Any, All.html b/PABCNetHelp/LinqDocGen/Files/Any, All.html
new file mode 100644
index 000000000..c8a256bae
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Any, All.html
@@ -0,0 +1,21 @@
+ sequence of T.
+function Any(): boolean;
+, - . + |
+function Any(predicate: T->boolean): boolean;
+, - . + |
+function All(predicate: T->boolean): boolean;
+, . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/AsEnumerable.html b/PABCNetHelp/LinqDocGen/Files/AsEnumerable.html
new file mode 100644
index 000000000..5bf904c4f
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/AsEnumerable.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function AsEnumerable(): sequence of T;
+, IEnumerable |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Cast.html b/PABCNetHelp/LinqDocGen/Files/Cast.html
new file mode 100644
index 000000000..843587689
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Cast.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function Cast<Res>(): sequence of Res;
+System.Collections.IEnumerable . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Concat.html b/PABCNetHelp/LinqDocGen/Files/Concat.html
new file mode 100644
index 000000000..1283581d0
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Concat.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function Concat(second: sequence of T): sequence of T;
+, . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Contains.html b/PABCNetHelp/LinqDocGen/Files/Contains.html
new file mode 100644
index 000000000..a88145dae
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Contains.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function Contains(value: T): boolean;
+, , . + |
+function Contains(value: T; comparer: IEqualityComparer<T>): boolean;
+, , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Count.html b/PABCNetHelp/LinqDocGen/Files/Count.html
new file mode 100644
index 000000000..b3a12593d
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Count.html
@@ -0,0 +1,24 @@
+ sequence of T.
+function Count(): integer;
+. + |
+function Count(predicate: T->boolean): integer;
+, , . + |
+function LongCount(): int64;
+Int64, . + |
+function LongCount(predicate: T->boolean): int64;
+Int64, , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/DefaultIfEmpty.html b/PABCNetHelp/LinqDocGen/Files/DefaultIfEmpty.html
new file mode 100644
index 000000000..59b29aa54
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/DefaultIfEmpty.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function DefaultIfEmpty(): sequence of T;
+, , . + |
+function DefaultIfEmpty(defaultValue: T): sequence of T;
+, , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Distinct.html b/PABCNetHelp/LinqDocGen/Files/Distinct.html
new file mode 100644
index 000000000..6d63bbdb2
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Distinct.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function Distinct(): sequence of T;
+. + |
+function Distinct(comparer: IEqualityComparer<T>): sequence of T;
+, comparer. + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/ElementAt, ElementAtOrDefault.html b/PABCNetHelp/LinqDocGen/Files/ElementAt, ElementAtOrDefault.html
new file mode 100644
index 000000000..78f3ae329
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/ElementAt, ElementAtOrDefault.html
@@ -0,0 +1,17 @@
+ sequence of T.
+function ElementAt(index: integer): T;
+. + |
+function ElementAtOrDefault(index: integer): T;
+, . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/First, FirstOrDefault.html b/PABCNetHelp/LinqDocGen/Files/First, FirstOrDefault.html
new file mode 100644
index 000000000..2e7b38347
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/First, FirstOrDefault.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function First(): T;
+. + |
+function First(predicate: T->boolean): T;
+, . + |
+function FirstOrDefault(): T;
+, . + |
+function FirstOrDefault(predicate: T->boolean): T;
+, . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/ForEach.html b/PABCNetHelp/LinqDocGen/Files/ForEach.html
new file mode 100644
index 000000000..7ea059ab7
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/ForEach.html
@@ -0,0 +1,12 @@
+ sequence of T.
+procedure ForEach(action: T->());
+. + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/GroupBy.html b/PABCNetHelp/LinqDocGen/Files/GroupBy.html
new file mode 100644
index 000000000..cf760a46a
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/GroupBy.html
@@ -0,0 +1,40 @@
+ sequence of T.
+function GroupBy<Key>(keySelector: T->Key): IEnumerable<IGrouping<Key,T>>;
+; . + |
+function GroupBy<Key>(keySelector: T->Key; comparer: System.Collections.Generic.IEqualityComparer<Key>): IEnumerable<IGrouping<Key,T>>;
+, ; . + |
+function GroupBy<Key,Element>(keySelector: T->Key; elementSelector: T->Element): IEnumerable<IGrouping<Key,T>>;
+. ; . + |
+function GroupBy<Key,Element>(keySelector: T->Key; elementSelector: T->Element; comparer: IEqualityComparer<Key>): IEnumerable<IGrouping<Key,Element>>;
+. , . + |
+function GroupBy<Key,Res>(keySelector: T->Key; resultSelector: (Key,sequence of T)->Res): sequence of Res;
+. + |
+function GroupBy<Key,Element,Res>(keySelector: T->Key; elementSelector: T->Element; resultSelector: (Key,sequence of Element)->Res): sequence of Res;
+. . + |
+function GroupBy<Key,Res>(keySelector: T->Key; resultSelector: (Key,sequence of T)->Res; comparer: IEqualityComparer<Key>): sequence of Res;
+. . + |
+function GroupBy<Key,Element,Res>(keySelector: T->Key; elementSelector: System.T->Element; resultSelector: (Key,sequence of Element)->Res; comparer: IEqualityComparer<Key>): sequence of Res;
+. , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/GroupJoin.html b/PABCNetHelp/LinqDocGen/Files/GroupJoin.html
new file mode 100644
index 000000000..80af9d0a9
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/GroupJoin.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function GroupJoin<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,sequence of TInner)->Res): sequence of Res;
+. resultSelector . + |
+function GroupJoin<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,sequence of TInner)->Res; comparer: IEqualityComparer<Key>): sequence of Res;
+. . resultSelector . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Join.html b/PABCNetHelp/LinqDocGen/Files/Join.html
new file mode 100644
index 000000000..c4dc8d15d
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Join.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function Join<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,TInner)->Res): sequence of Res;
+. resultSelector . + |
+function Join<TInner,Key,Res>(inner: sequence of TInner; outerKeySelector: T->Key; innerKeySelector: TInner->TKey; resultSelector: (T,TInner)->Res; comparer: System.Collections.Generic.IEqualityComparer<Key>): sequence of Res;
+. resultSelector . comparer. + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/JoinIntoString.html b/PABCNetHelp/LinqDocGen/Files/JoinIntoString.html
new file mode 100644
index 000000000..cd5b6b8bb
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/JoinIntoString.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function JoinIntoString(delim: string := ' '): string;
+, , delim . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Last, LastOrDefault.html b/PABCNetHelp/LinqDocGen/Files/Last, LastOrDefault.html
new file mode 100644
index 000000000..f6970f5af
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Last, LastOrDefault.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function Last(): T;
+. + |
+function Last(predicate: T->boolean): T;
+, . + |
+function LastOrDefault(): T;
+, . + |
+function LastOrDefault(predicate: T->boolean): T;
+, , , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Min, Max.html b/PABCNetHelp/LinqDocGen/Files/Min, Max.html
new file mode 100644
index 000000000..2cda99ea1
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Min, Max.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function Min(): ;
+. + |
+function Min(selector: T->): ;
+. + |
+function Max(): ;
+. + |
+function Max(selector: T->): ;
+. + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/OfType.html b/PABCNetHelp/LinqDocGen/Files/OfType.html
new file mode 100644
index 000000000..df9473a13
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/OfType.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function OfType<Res>(): sequence of Res;
+System.Collections.IEnumerable . . . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/OrderBy, OrderByDescending.html b/PABCNetHelp/LinqDocGen/Files/OrderBy, OrderByDescending.html
new file mode 100644
index 000000000..8563751d7
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/OrderBy, OrderByDescending.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function OrderBy<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function OrderBy<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function OrderByDescending<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function OrderByDescending<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Print.html b/PABCNetHelp/LinqDocGen/Files/Print.html
new file mode 100644
index 000000000..1b1fa2d43
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Print.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function Print(delim: string := ' '): sequence of T;
+, delim . + |
+function Println(delim: string := ' '): sequence of T;
+, delim , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Reverse.html b/PABCNetHelp/LinqDocGen/Files/Reverse.html
new file mode 100644
index 000000000..9e56ef2ec
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Reverse.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function Reverse(): sequence of T;
+. + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Select.html b/PABCNetHelp/LinqDocGen/Files/Select.html
new file mode 100644
index 000000000..cff78d3bd
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Select.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function Select<Res>(selector: T->Res): sequence of Res;
+selector. , . + |
+function Select<Res>(selector: (T,integer)->Res): sequence of Res;
+selector, . , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/SelectMany.html b/PABCNetHelp/LinqDocGen/Files/SelectMany.html
new file mode 100644
index 000000000..c092b4abc
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/SelectMany.html
@@ -0,0 +1,24 @@
+ sequence of T.
+function SelectMany<Res>(selector: T->sequence of Res): sequence of Res;
+. . + |
+function SelectMany<Res>(selector: (T,integer)->sequence of Res): sequence of Res;
+. . + |
+function SelectMany<Coll,Res>(collSelector: (T,integer)->sequence of Coll; resultSelector: (T,Coll)->Res): sequence of Res;
+, . . . + |
+function SelectMany<Coll,Res>(collSelector: T->sequence of Coll; resultSelector: (T,Coll)->Res): sequence of Res;
+, . . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/SequenceEqual.html b/PABCNetHelp/LinqDocGen/Files/SequenceEqual.html
new file mode 100644
index 000000000..1419fcca3
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/SequenceEqual.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function SequenceEqual(second: sequence of T): boolean;
+, . + |
+function SequenceEqual(second: sequence of T; comparer: IEqualityComparer<T>): boolean;
+, , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Single, SingleOrDefault.html b/PABCNetHelp/LinqDocGen/Files/Single, SingleOrDefault.html
new file mode 100644
index 000000000..a4e07051d
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Single, SingleOrDefault.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function Single(): T;
+, 1. + |
+function Single(predicate: T->boolean): T;
+, , , . + |
+function SingleOrDefault(): T;
+, ; , . + |
+function SingleOrDefault(predicate: T->boolean): T;
+, , , ; , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Sorted.html b/PABCNetHelp/LinqDocGen/Files/Sorted.html
new file mode 100644
index 000000000..12dc7c090
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Sorted.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function Sorted(): sequence of T;
+. + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Sum, Average.html b/PABCNetHelp/LinqDocGen/Files/Sum, Average.html
new file mode 100644
index 000000000..98b05e710
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Sum, Average.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function Sum(): ;
+. + |
+function Sum(selector: T->): ;
+, . + |
+function Average(): real;
+. + |
+function Average(selector: T->): real;
+, . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Take, TakeWhile, Skip, SkipWhile.html b/PABCNetHelp/LinqDocGen/Files/Take, TakeWhile, Skip, SkipWhile.html
new file mode 100644
index 000000000..9990fa737
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Take, TakeWhile, Skip, SkipWhile.html
@@ -0,0 +1,35 @@
+ sequence of T.
+function Take(count: integer): sequence of T;
+count . + |
+function TakeWhile(predicate: T->boolean): sequence of T;
+, , . + |
+function TakeWhile(predicate: (T,integer)->boolean): sequence of T;
+, , ( ). + |
+function Skip(count: integer): sequence of T;
+count . + |
+function SkipWhile(predicate: T->boolean): sequence of T;
+, , . + |
+function SkipWhile(predicate: (T,integer)->boolean): sequence of T;
+, , ( ). + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/ThenBy,ThenByDescending.html b/PABCNetHelp/LinqDocGen/Files/ThenBy,ThenByDescending.html
new file mode 100644
index 000000000..2f81c4265
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/ThenBy,ThenByDescending.html
@@ -0,0 +1,25 @@
+ sequence of T.
+function ThenBy<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function ThenBy<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+function ThenByDescending<Key>(keySelector: T->Key): System.Linq.IOrderedEnumerable<T>;
+. keySelector - , . + |
+function ThenByDescending<Key>(keySelector: T->Key; comparer: IComparer<Key>): System.Linq.IOrderedEnumerable<T>;
+comparer . keySelector - , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/ToArray, ToList.html b/PABCNetHelp/LinqDocGen/Files/ToArray, ToList.html
new file mode 100644
index 000000000..3a42998f2
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/ToArray, ToList.html
@@ -0,0 +1,17 @@
+ sequence of T.
+function ToArray(): array of T;
+. + |
+function ToList(): List<T>;
+List . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/ToDictionary.html b/PABCNetHelp/LinqDocGen/Files/ToDictionary.html
new file mode 100644
index 000000000..7b5fb40c3
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/ToDictionary.html
@@ -0,0 +1,24 @@
+ sequence of T.
+function ToDictionary<Key>(keySelector: T->Key): Dictionary<Key,T>;
+Dictionary . + |
+function ToDictionary<Key>(keySelector: T->Key; comparer: IEqualityComparer<Key>): Dictionary<Key,T>;
+Dictionary . + |
+function ToDictionary<Key,Element>(keySelector: T->Key; elementSelector: T->Element): Dictionary<Key,Element>;
+Dictionary . + |
+function ToDictionary<Key,Element>(keySelector: T->Key; elementSelector: T->Element; comparer: IEqualityComparer<Key>): Dictionary<Key,Element>;
+Dictionary . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/ToLookup.html b/PABCNetHelp/LinqDocGen/Files/ToLookup.html
new file mode 100644
index 000000000..040bce0f4
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/ToLookup.html
@@ -0,0 +1,24 @@
+ sequence of T.
+function ToLookup<Key>(keySelector: T->Key): System.Linq.ILookup<Key,T>;
+System.Linq.Lookup . + |
+function ToLookup<Key>(keySelector: T->Key; comparer: IEqualityComparer<Key>): System.Linq.ILookup<Key,T>;
+System.Linq.Lookup . + |
+function ToLookup<Key,Element>(keySelector: T->Key; elementSelector: T->Element): System.Linq.ILookup<Key,Element>;
+System.Linq.Lookup . + |
+function ToLookup<Key,Element>(keySelector: T->Key; elementSelector: T->Element; comparer: IEqualityComparer<Key>): System.Linq.ILookup<Key,Element>;
+System.Linq.Lookup . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Union,Intersect,Except.html b/PABCNetHelp/LinqDocGen/Files/Union,Intersect,Except.html
new file mode 100644
index 000000000..49fabe519
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Union,Intersect,Except.html
@@ -0,0 +1,34 @@
+ sequence of T.
+function Union(second: sequence of T): sequence of T;
+, . + |
+function Union(second: sequence of T; comparer: IEqualityComparer<T>): sequence of T;
+, , . + |
+function Intersect(second: sequence of T): sequence of T;
+, . + |
+function Intersect(second: sequence of T; comparer: IEqualityComparer<T>): sequence of T;
+, , . + |
+function Except(second: sequence of T): sequence of T;
+, . + |
+function Except(second: sequence of T; comparer: IEqualityComparer<T>): sequence of T;
+, , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Where.html b/PABCNetHelp/LinqDocGen/Files/Where.html
new file mode 100644
index 000000000..a44bb0cd2
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Where.html
@@ -0,0 +1,16 @@
+ sequence of T.
+function Where(predicate: T->boolean): sequence of T;
+. , . + |
+function Where(predicate: (T,integer)->boolean): sequence of T;
+. , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Files/Zip.html b/PABCNetHelp/LinqDocGen/Files/Zip.html
new file mode 100644
index 000000000..dcd7a144e
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Files/Zip.html
@@ -0,0 +1,12 @@
+ sequence of T.
+function Zip<TSecond,Res>(second: sequence of TSecond; resultSelector: (T,TSecond)->Res): sequence of Res;
+, , . + |
+
diff --git a/PABCNetHelp/LinqDocGen/Документация.pas b/PABCNetHelp/LinqDocGen/Документация.pas
new file mode 100644
index 000000000..4e3a7c10b
--- /dev/null
+++ b/PABCNetHelp/LinqDocGen/Документация.pas
@@ -0,0 +1,339 @@
+// Print
+///- , delim
+function IEnumerable