r.ToString(2) в PABCSystem

This commit is contained in:
miks1965 2016-05-08 21:27:29 +03:00
parent 47b50802b4
commit 857b5a478c
8 changed files with 28 additions and 6 deletions

View file

@ -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)

View file

@ -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;

View file

@ -1,4 +1,4 @@
%MINOR%=1
%REVISION%=1236
%REVISION%=1238
%COREVERSION%=0
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.1.0.1236'
!define VERSION '3.1.0.1238'

View file

@ -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
//------------------------------------------------------------------------------

Binary file not shown.

View file

@ -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
//------------------------------------------------------------------------------

View file

@ -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