diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 02f17ad89..8b0fa9d7b 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 = "9"; public const string Build = "0"; - public const string Revision = "3364"; + public const string Revision = "3371"; 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 ac7d17052..8abe01b6f 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=3364 %MINOR%=9 +%REVISION%=3371 +%COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 33c121181..fba55ae00 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3364 +3.9.0.3371 diff --git a/ReleaseGenerators/PT4/Lib/PT4ABegin.dll b/ReleaseGenerators/PT4/Lib/PT4ABegin.dll index e54002f1f..51f32bc9c 100644 Binary files a/ReleaseGenerators/PT4/Lib/PT4ABegin.dll and b/ReleaseGenerators/PT4/Lib/PT4ABegin.dll differ diff --git a/ReleaseGenerators/PT4/Lib/xPT4ABegin.dll b/ReleaseGenerators/PT4/Lib/xPT4ABegin.dll index 5f1715522..d82534798 100644 Binary files a/ReleaseGenerators/PT4/Lib/xPT4ABegin.dll and b/ReleaseGenerators/PT4/Lib/xPT4ABegin.dll differ diff --git a/ReleaseGenerators/PT4/PT4Demo.exe b/ReleaseGenerators/PT4/PT4Demo.exe index 5b3ac844c..9a1ca1dbf 100644 Binary files a/ReleaseGenerators/PT4/PT4Demo.exe and b/ReleaseGenerators/PT4/PT4Demo.exe differ diff --git a/ReleaseGenerators/PT4/PT4Load.exe b/ReleaseGenerators/PT4/PT4Load.exe index 5e5486316..b19181d5f 100644 Binary files a/ReleaseGenerators/PT4/PT4Load.exe and b/ReleaseGenerators/PT4/PT4Load.exe differ diff --git a/ReleaseGenerators/PT4/PT4pabc.dll b/ReleaseGenerators/PT4/PT4pabc.dll index e9f3fdce5..d35dce4e6 100644 Binary files a/ReleaseGenerators/PT4/PT4pabc.dll and b/ReleaseGenerators/PT4/PT4pabc.dll differ diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 1047d324f..99e4326e3 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3364' +!define VERSION '3.9.0.3371' diff --git a/TestSuite/CompilationSamples/School.pas b/TestSuite/CompilationSamples/School.pas index 72ad7bd6f..871c504c0 100644 --- a/TestSuite/CompilationSamples/School.pas +++ b/TestSuite/CompilationSamples/School.pas @@ -1,4 +1,4 @@ -/// Учебный модуль, реализующий базовые алгоритмы информатики (21.09.2023) +/// Учебный модуль, реализующий базовые алгоритмы информатики (02.10.2023) unit School; interface @@ -10,8 +10,10 @@ type addr2: string; // двоичный адрес addr10: longword; // адрес в виде десятичного числа + /// Проверка правильности записи адреса в десятичном формате с октетами function AddressValid(address: string): boolean; + /// Проверка правильности записи 32-разрядного адреса в бинарном представлении function AddressBinValid(address: string): boolean; /// Перевод ip-адреса/маски из десятичного представления с октетами в 32-битное @@ -291,6 +293,12 @@ function ReplaceMany(s: string; source, target: IList): string; /// В строке s меняет местами подстроки ss1 и ss2 procedure SwapSubstr(var s: string; ss1, ss2: string); +/// Множественная замена символов в строке s +/// Каждый символ строки s[i] последовательно ищется в source. +/// Если найден, source[j] заменяется target[j], если не найден - не меняется. +/// Если j больше длины строки target, символ s[i] удаляется. +function Translate(s, source, target: string): string; + implementation type @@ -368,7 +376,7 @@ function Oct(number: BigInteger): string; begin if number < 0 then number := -number; Result := ''; - while number >= 2 do + while number >= 8 do begin Result += byte(number mod 8); number := number div 8 @@ -1138,6 +1146,33 @@ end; /// В строке s меняет местами подстроки ss1 и ss2 procedure SwapSubstr(var Self: string; ss1, ss2: string); extensionmethod := SwapSubstr(Self, ss1, ss2); + +/// Множественная замена символов в строке s +/// Каждый символ строки s[i] последовательно ищется в source. +/// Если найден, source[j] заменяется target[j], если не найден - не меняется. +/// Если j больше длины строки target, символ s[i] удаляется. +function Translate(s, source, target: string): string; +begin + var sb := new StringBuilder(s.Length); + foreach var x in s do + begin + var ind := source.IndexOf(x); + if ind >= 0 then + begin + if ind <= target.Length - 1 then + sb.Append(target[ind + 1]) + end + else sb.Append(x) + end; + Result := sb.ToString +end; + +/// Множественная замена символов в строке s +/// Каждый символ строки s[i] последовательно ищется в source. +/// Если найден, source[j] заменяется target[j], если не найден - не меняется. +/// Если j больше длины строки target, символ s[i] удаляется. +function Translate(Self, source, target: string): string; + extensionmethod := Translate(Self, source, target); {$endregion} diff --git a/VisualPascalABCNET/Workbench/WindowOperations.cs b/VisualPascalABCNET/Workbench/WindowOperations.cs index 03be33e1c..9a6ae7191 100644 --- a/VisualPascalABCNET/Workbench/WindowOperations.cs +++ b/VisualPascalABCNET/Workbench/WindowOperations.cs @@ -188,7 +188,7 @@ namespace VisualPascalABC { CodeFileDocumentControl tp = new CodeFileDocumentControl(this); //tp.BorderStyle=BorderStyle.Fixed3D; - //tp.Font = new Font("MS Sans Serif", tp.Font.Size); + //tp.Font = new System.Drawing.Font("MS Sans Serif", tp.Font.Size); RichTextBox tb = OutputWindow.outputTextBox; if (OpenDocuments.Count > 0) tb = CopyTextBox(OutputWindow.outputTextBox); diff --git a/VisualPascalABCNETLinux/Form1.cs b/VisualPascalABCNETLinux/Form1.cs index 67f12ea82..f2bf248de 100644 --- a/VisualPascalABCNETLinux/Form1.cs +++ b/VisualPascalABCNETLinux/Form1.cs @@ -449,6 +449,18 @@ namespace VisualPascalABC private void Form1_Load(object sender, EventArgs e) { + // Куча констант - VS2005DockPaneStrip.cs строка 98 + // _DocumentIconGapBottom сделать 5 вместо 2 + // _DocumentTabMaxWidth 600 сделать и в Win версии!!! + + MainDockPanel.Theme.Skin.DockPaneStripSkin.TextFont = menuStrip1.Font; + BottomDockPanel.Theme.Skin.DockPaneStripSkin.TextFont = menuStrip1.Font; + statusStrip1.Font = menuStrip1.Font; + //var name = BottomDockPanel.Theme.Skin.DockPaneStripSkin.TextFont.Name; + //var sz = (float)9.0; + //MainDockPanel.Theme.Skin.DockPaneStripSkin.TextFont = new Font(name, sz); + //BottomDockPanel.Theme.Skin.DockPaneStripSkin.TextFont = new Font(name, sz); + BottomDockPanel.AllowEndUserDocking = false; //CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea.KeyEventHandler += TextArea_KeyEventHandler; diff --git a/VisualPascalABCNETLinux/Workbench/WindowOperations.cs b/VisualPascalABCNETLinux/Workbench/WindowOperations.cs index 13b090329..8d3fb4321 100644 --- a/VisualPascalABCNETLinux/Workbench/WindowOperations.cs +++ b/VisualPascalABCNETLinux/Workbench/WindowOperations.cs @@ -193,7 +193,7 @@ namespace VisualPascalABC // SSM 03.06.22 - это надо убрать здесь - почему-то не работает активация - надо туда //_currentCodeFileDocument = tp; // должно по DockStateChanged - но мб неверно //tp.BorderStyle=BorderStyle.Fixed3D; - //tp.Font = new Font("MS Sans Serif", tp.Font.Size); + //tp.Font = new System.Drawing.Font("MS Sans Serif", tp.Font.Size); RichTextBox tb = OutputWindow.outputTextBox; if (OpenDocuments.Count > 0) tb = CopyTextBox(OutputWindow.outputTextBox); diff --git a/bin/Lib/School.pas b/bin/Lib/School.pas index 72ad7bd6f..871c504c0 100644 --- a/bin/Lib/School.pas +++ b/bin/Lib/School.pas @@ -1,4 +1,4 @@ -/// Учебный модуль, реализующий базовые алгоритмы информатики (21.09.2023) +/// Учебный модуль, реализующий базовые алгоритмы информатики (02.10.2023) unit School; interface @@ -10,8 +10,10 @@ type addr2: string; // двоичный адрес addr10: longword; // адрес в виде десятичного числа + /// Проверка правильности записи адреса в десятичном формате с октетами function AddressValid(address: string): boolean; + /// Проверка правильности записи 32-разрядного адреса в бинарном представлении function AddressBinValid(address: string): boolean; /// Перевод ip-адреса/маски из десятичного представления с октетами в 32-битное @@ -291,6 +293,12 @@ function ReplaceMany(s: string; source, target: IList): string; /// В строке s меняет местами подстроки ss1 и ss2 procedure SwapSubstr(var s: string; ss1, ss2: string); +/// Множественная замена символов в строке s +/// Каждый символ строки s[i] последовательно ищется в source. +/// Если найден, source[j] заменяется target[j], если не найден - не меняется. +/// Если j больше длины строки target, символ s[i] удаляется. +function Translate(s, source, target: string): string; + implementation type @@ -368,7 +376,7 @@ function Oct(number: BigInteger): string; begin if number < 0 then number := -number; Result := ''; - while number >= 2 do + while number >= 8 do begin Result += byte(number mod 8); number := number div 8 @@ -1138,6 +1146,33 @@ end; /// В строке s меняет местами подстроки ss1 и ss2 procedure SwapSubstr(var Self: string; ss1, ss2: string); extensionmethod := SwapSubstr(Self, ss1, ss2); + +/// Множественная замена символов в строке s +/// Каждый символ строки s[i] последовательно ищется в source. +/// Если найден, source[j] заменяется target[j], если не найден - не меняется. +/// Если j больше длины строки target, символ s[i] удаляется. +function Translate(s, source, target: string): string; +begin + var sb := new StringBuilder(s.Length); + foreach var x in s do + begin + var ind := source.IndexOf(x); + if ind >= 0 then + begin + if ind <= target.Length - 1 then + sb.Append(target[ind + 1]) + end + else sb.Append(x) + end; + Result := sb.ToString +end; + +/// Множественная замена символов в строке s +/// Каждый символ строки s[i] последовательно ищется в source. +/// Если найден, source[j] заменяется target[j], если не найден - не меняется. +/// Если j больше длины строки target, символ s[i] удаляется. +function Translate(Self, source, target: string): string; + extensionmethod := Translate(Self, source, target); {$endregion} diff --git a/bin/PT4/Lib/PT4ABegin.dll b/bin/PT4/Lib/PT4ABegin.dll index e54002f1f..51f32bc9c 100644 Binary files a/bin/PT4/Lib/PT4ABegin.dll and b/bin/PT4/Lib/PT4ABegin.dll differ diff --git a/bin/PT4/Lib/xPT4ABegin.dll b/bin/PT4/Lib/xPT4ABegin.dll index 5f1715522..d82534798 100644 Binary files a/bin/PT4/Lib/xPT4ABegin.dll and b/bin/PT4/Lib/xPT4ABegin.dll differ