diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 6e301287b..a341e09a9 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "1"; public const string Build = "0"; - public const string Revision = "1229"; + public const string Revision = "1230"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index dc017231b..a3b57d963 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=1229 %MINOR%=1 +%REVISION%=1230 +%COREVERSION%=0 %MAJOR%=3 diff --git a/InstallerSamples/!MainFeatures/01_First/WriteAll.pas b/InstallerSamples/!MainFeatures/01_First/WriteAll.pas index 7b9ca40ce..c0a6160fc 100644 --- a/InstallerSamples/!MainFeatures/01_First/WriteAll.pas +++ b/InstallerSamples/!MainFeatures/01_First/WriteAll.pas @@ -1,4 +1,4 @@ -/// Вывод различных типов процедурой write +/// Вывод различных типов процедурой write begin // Вывод, целого, строки, вещественного Writeln(1,' ',2.5); @@ -7,6 +7,10 @@ begin // Вывод логического Writeln(True); var a: array [1..10] of integer; - // Вывод массива (выводится его тип) + // Вывод статического массива Writeln(a); + // Вывод динамического массива + Writeln(Arr(2,3,5)); + // Вывод кортежа + Writeln(('Иванов',16)); end. \ No newline at end of file diff --git a/InstallerSamples/!MainFeatures/02_Types/CharFunc.pas b/InstallerSamples/!MainFeatures/02_Types/CharFunc.pas index 95bed5ad7..2c214d879 100644 --- a/InstallerSamples/!MainFeatures/02_Types/CharFunc.pas +++ b/InstallerSamples/!MainFeatures/02_Types/CharFunc.pas @@ -1,4 +1,4 @@ -// Стандартные функции Ord, Chr, OrdUnicode, ChrUnicode +// Стандартные функции Ord, Chr, OrdAnsi, ChrAnsi var c: char; i: integer; @@ -8,12 +8,12 @@ begin writeln; c := 'Ж'; i := Ord(c); - writelnFormat('Код символа {0} в кодировке Windows равен {1}',c,i); - c := Chr(i); - writelnFormat('Символ с кодом {0} в кодировке Windows - это {1}',i,c); - writeln; - i := OrdUnicode(c); writelnFormat('Код символа {0} в кодировке Unicode равен {1}',c,i); - c := ChrUnicode(i); + c := Chr(i); writelnFormat('Символ с кодом {0} в кодировке Unicode - это {1}',i,c); + writeln; + i := OrdAnsi(c); + writelnFormat('Код символа {0} в кодировке Windows равен {1}',c,i); + c := ChrAnsi(i); + writelnFormat('Символ с кодом {0} в кодировке Windows - это {1}',i,c); end. \ No newline at end of file diff --git a/InstallerSamples/!MainFeatures/02_Types/Dynarray.pas b/InstallerSamples/!MainFeatures/02_Types/Dynarray.pas index 63d162f37..3514a6c05 100644 --- a/InstallerSamples/!MainFeatures/02_Types/Dynarray.pas +++ b/InstallerSamples/!MainFeatures/02_Types/Dynarray.pas @@ -1,40 +1,24 @@ -// Процедуры и методы работы с динамическим массивом -uses System; - -procedure Print(a: array of integer); -begin - foreach v: integer in a do - Write(v, ' '); - Writeln; -end; - -var a: array of integer; +// Процедуры и методы работы с динамическим массивом begin - SetLength(a,10); // выделение памяти. А можно так: a := new integer[10]; - - // Заполнение массива - for var i:=0 to a.Length-1 do - a[i] := PABCSystem.Random(100); + var a := ArrRandom(10); // Вывод всех элементов массива - Print(a); + a.Println; - // Сортировка массива (знак & используется для того, - // чтобы воспользоваться ключевым словом array при обозначении - // класса Array) - &Array.Sort(a); - Print(a); + // Сортировка массива + a.Sort; + a.Println; // Обращение массива - &Array.Reverse(a); - Print(a); + a.Reverse; + a.Println; // Изменение размерамассиав с сохранением элементов. То же делает SetLength - &Array.Resize(a,a.Length+2); - Print(a); + a.Resize(a.Length+2); + a.Println; // Поиск вхождения элемента в массив - var i := &Array.IndexOf(a, 50); + var i := a.IndexOf(50); Writeln(i); end. \ No newline at end of file diff --git a/InstallerSamples/!MainFeatures/07_NetLibs/FormWebBrowser.pas b/InstallerSamples/!MainFeatures/07_NetLibs/FormWebBrowser.pas index 840d6506d..c69b9e760 100644 --- a/InstallerSamples/!MainFeatures/07_NetLibs/FormWebBrowser.pas +++ b/InstallerSamples/!MainFeatures/07_NetLibs/FormWebBrowser.pas @@ -1,4 +1,4 @@ -// Иллюстрация использования компонента WebBrowser +// Иллюстрация использования компонента WebBrowser {$apptype windows} {$reference System.Windows.Forms.dll} diff --git a/InstallerSamples/Graphics/GraphABC/MouseDownEvent.pas b/InstallerSamples/Graphics/GraphABC/MouseDownEvent.pas new file mode 100644 index 000000000..5dceee155 --- /dev/null +++ b/InstallerSamples/Graphics/GraphABC/MouseDownEvent.pas @@ -0,0 +1,5 @@ +uses GraphABC; + +begin + OnMouseDown := (x,y,mb) -> Circle(x,y,5); +end. \ No newline at end of file diff --git a/InstallerSamples/Graphics/GraphABC/MouseDraw.pas b/InstallerSamples/Graphics/GraphABC/MouseDraw.pas new file mode 100644 index 000000000..85ccdfb6c --- /dev/null +++ b/InstallerSamples/Graphics/GraphABC/MouseDraw.pas @@ -0,0 +1,7 @@ +uses GraphABC; + +begin + Window.Title := 'Ðèñîâàíèå ìûøüþ'; + OnMouseDown := (x,y,mb) -> MoveTo(x,y); + OnMouseMove := (x,y,mb) -> if mb=1 then LineTo(x,y); +end. \ No newline at end of file diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index a9f47d6ee..69f79d594 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.1.0.1229' +!define VERSION '3.1.0.1230' diff --git a/TreeConverter/TreeConversion/LambdaHelper.cs b/TreeConverter/TreeConversion/LambdaHelper.cs index f2e0969c2..76cd41be9 100644 --- a/TreeConverter/TreeConversion/LambdaHelper.cs +++ b/TreeConverter/TreeConversion/LambdaHelper.cs @@ -103,7 +103,7 @@ namespace PascalABCCompiler.TreeConverter context.converted_namespace.functions.remove_at(lastIndex); } } - else + //else SSM 27/04/16 - грубое исправление ошибки #147 { // Если добавилась лямбда как метод класса, то удаляем оттуда if (context.converted_type != null diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index 789d61afc..d005b7a37 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ