diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index b5ab601d5..3084ace18 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 = "5"; public const string Build = "0"; - public const string Revision = "2199"; + public const string Revision = "2201"; 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 990b48504..64cba8308 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=5 -%REVISION%=2199 +%REVISION%=2201 %COREVERSION%=0 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 9d71b75b6..6cb576500 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.0.2199' +!define VERSION '3.5.0.2201' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 47a5885a2..fbb343fe4 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -1228,8 +1228,8 @@ function ExpandFileName(fname: string): string; // ----------------------------------------------------- //>> Математические подпрограммы # Math subroutines // ----------------------------------------------------- -///-function Sign(x: число): число; -/// Возвращает знак числа x +///-function Sign(x: число): integer; +/// Возвращает -1, 0 или +1 в зависимости от знака числа x function Sign(x: shortint): integer; ///-- function Sign(x: smallint): integer; diff --git a/VisualPascalABCNET/AutoInsertCode/AutoInsertCode.cs b/VisualPascalABCNET/AutoInsertCode/AutoInsertCode.cs index 4d46b32db..963312851 100644 --- a/VisualPascalABCNET/AutoInsertCode/AutoInsertCode.cs +++ b/VisualPascalABCNET/AutoInsertCode/AutoInsertCode.cs @@ -104,7 +104,7 @@ namespace VisualPascalABC int start = TextUtilities.FindPrevWordStart(editor.Document, caret.Offset); var Text = editor.Document.GetText(start, caret.Offset - start).TrimEnd(); - if (Text.ToLower() == "begin") + if (Text.ToLower() == "begin") { string cur, next, prev; GetCurNextLines(out cur, out next, out prev); @@ -183,15 +183,17 @@ namespace VisualPascalABC else { var seg = doc.GetLineSegment(ta.Caret.Line); - var curline = doc.GetText(seg); - if (curline.Contains(":=")) - { - var curlinenew = Regex.Replace(curline, @"(\s*)(\S+)(\s*):=(\s*)(.+)(;?)(\s*)", @"$1$2 := $5;"); - doc.Replace(seg.Offset, curline.Length, curlinenew); - ta.Caret.Column = curlinenew.Length; - return false; + var curline = doc.GetText(seg).TrimEnd(); + if (ta.Caret.Column >= curline.Length) + if (curline.Contains(":=")) + { + var curlinenew = Regex.Replace(curline, @"(\s*)(\S+)(\s*):=(\s*)(.+)(;?)", @"$1$2 := $5;"); + curlinenew = curlinenew.Replace(";;", ";"); + doc.Replace(seg.Offset, curline.Length, curlinenew); + ta.Caret.Column = curlinenew.Length; + return false; + } } - } return false; } diff --git a/_GenerateAllSetups.bat b/_GenerateAllSetups.bat index 715622880..c926d2448 100644 --- a/_GenerateAllSetups.bat +++ b/_GenerateAllSetups.bat @@ -46,7 +46,7 @@ ExecHide.exe gacutil.exe /i ..\bin\Lib\PABCRtl.dll @IF %ERRORLEVEL% NEQ 0 GOTO ERROR cd ..\bin -TestRunner.exe +//TestRunner.exe cd ..\ReleaseGenerators call PascalABCNET_ALL.bat diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 47a5885a2..fbb343fe4 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -1228,8 +1228,8 @@ function ExpandFileName(fname: string): string; // ----------------------------------------------------- //>> Математические подпрограммы # Math subroutines // ----------------------------------------------------- -///-function Sign(x: число): число; -/// Возвращает знак числа x +///-function Sign(x: число): integer; +/// Возвращает -1, 0 или +1 в зависимости от знака числа x function Sign(x: shortint): integer; ///-- function Sign(x: smallint): integer;