diff --git a/CodeCompletion/Testing.cs b/CodeCompletion/Testing.cs index 0d42dc55b..d442e0240 100644 --- a/CodeCompletion/Testing.cs +++ b/CodeCompletion/Testing.cs @@ -20,7 +20,7 @@ namespace CodeCompletion { TestExpressionExtract(); //TestVBNETExpressionExtract(); - TestIntellisense(Path.Combine(@"c:\Work\Miks\_PABCNETGitHub\TestSuite", "intellisense_tests")); + //TestIntellisense(Path.Combine(@"c:\Work\Miks\_PABCNETGitHub\TestSuite", "intellisense_tests")); } public static void TestIntellisense(string dir) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 69b5146bc..f4ec25eb3 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 = "1236"; + public const string Revision = "1238"; 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 1b4c5551c..084a6ab39 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=1 -%REVISION%=1236 +%REVISION%=1238 %COREVERSION%=0 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index e36781bb1..41096b431 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.1.0.1236' +!define VERSION '3.1.0.1238' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index dcfd6466d..18fed8799 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -8645,6 +8645,17 @@ begin Result := TruncBigInteger(Self); end; +/// Возвращает вещественное, отформатированное к строке с frac цифрами после десятичной точки +function ToString(Self: real; frac: integer): string; extensionmethod; +begin + if frac<0 then + raise new System.ArgumentOutOfRangeException('frac','frac<0'); + if frac>=100 then + raise new System.ArgumentOutOfRangeException('frac','frac>=100'); + Result := Format('{0:f'+frac+'}',Self) +end; + + //------------------------------------------------------------------------------ //>> Методы расширения типа char # Extension methods for char //------------------------------------------------------------------------------ diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index b9fe72cb0..ab17f2a61 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index dcfd6466d..18fed8799 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -8645,6 +8645,17 @@ begin Result := TruncBigInteger(Self); end; +/// Возвращает вещественное, отформатированное к строке с frac цифрами после десятичной точки +function ToString(Self: real; frac: integer): string; extensionmethod; +begin + if frac<0 then + raise new System.ArgumentOutOfRangeException('frac','frac<0'); + if frac>=100 then + raise new System.ArgumentOutOfRangeException('frac','frac>=100'); + Result := Format('{0:f'+frac+'}',Self) +end; + + //------------------------------------------------------------------------------ //>> Методы расширения типа char # Extension methods for char //------------------------------------------------------------------------------ diff --git a/bin/TestRunner.pas b/bin/TestRunner.pas index 41e31d27c..1dbd9b2b7 100644 --- a/bin/TestRunner.pas +++ b/bin/TestRunner.pas @@ -351,8 +351,8 @@ begin System.Environment.CurrentDirectory := Path.GetDirectoryName(GetEXEFileName()); RunExpressionsExtractTests; writeln('Intellisense expression tests run successfully'); - //RunIntellisenseTests; - //writeln('Intellisense tests run successfully'); + RunIntellisenseTests; + writeln('Intellisense tests run successfully'); RunFormatterTests; writeln('Formatter tests run successfully'); except