fix #1255
This commit is contained in:
parent
0ee4def9ca
commit
1a14230dac
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "7";
|
||||
public const string Build = "1";
|
||||
public const string Revision = "2796";
|
||||
public const string Revision = "2798";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=1
|
||||
%REVISION%=2796
|
||||
%REVISION%=2798
|
||||
%MINOR%=7
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.7.1.2796
|
||||
3.7.1.2798
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.7.1.2796'
|
||||
!define VERSION '3.7.1.2798'
|
||||
|
|
|
|||
|
|
@ -168,12 +168,15 @@ namespace SyntaxVisitors
|
|||
}
|
||||
|
||||
var GetEnumeratorBody = new statement_list();
|
||||
var ResetBody = new statement_list();
|
||||
var nsex = new raise_stmt(new new_expr("System.NotSupportedException"), null);
|
||||
ResetBody.Add(nsex);
|
||||
|
||||
// Системные поля и методы для реализации интерфейса IEnumerable
|
||||
cm.Add(new var_def_statement(YieldConsts.State, "integer"),
|
||||
new var_def_statement(YieldConsts.Current, stels),
|
||||
procedure_definition.EmptyDefaultConstructor,
|
||||
new procedure_definition("Reset"),
|
||||
new procedure_definition("Reset", ResetBody),
|
||||
new procedure_definition("MoveNext", "boolean", pd.proc_body),
|
||||
new procedure_definition("System.Collections.IEnumerator.get_Current", "object", new assign("Result", YieldConsts.Current)),
|
||||
//new procedure_definition("System.Collections.IEnumerable.GetEnumerator", "System.Collections.IEnumerator", new assign("Result", "Self"))
|
||||
|
|
|
|||
|
|
@ -12415,6 +12415,21 @@ function TryToInteger(Self: string; var value: integer): boolean; extensionmetho
|
|||
///При невозможности преобразования возвращается False
|
||||
function TryToReal(Self: string; var value: real): boolean; extensionmethod := TryStrToReal(Self,value);
|
||||
|
||||
|
||||
/// Возвращает True если строку можно преобразовать в вещественное
|
||||
function IsReal(Self: string): boolean; extensionmethod;
|
||||
begin
|
||||
var r: real;
|
||||
Result := TryStrToReal(Self, r);
|
||||
end;
|
||||
|
||||
/// Возвращает True если строку можно преобразовать в целое
|
||||
function IsInteger(Self: string): boolean; extensionmethod;
|
||||
begin
|
||||
var i: integer;
|
||||
Result := TryStrToInt(Self, i);
|
||||
end;
|
||||
|
||||
/// Преобразует строку в целое
|
||||
///При невозможности преобразования возвращается defaultvalue
|
||||
function ToInteger(Self: string; defaultvalue: integer): integer; extensionmethod;
|
||||
|
|
|
|||
Loading…
Reference in a new issue