RxFPC:new function - rxIsValueInteger

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6761 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2018-12-18 08:51:04 +00:00
parent 02281cd15f
commit 1f072086f1
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,11 @@
</element><element name="WarningBox.S"><short>Текст предупрежедения</short> </element><element name="WarningBox.S"><short>Текст предупрежедения</short>
</element><element name="ErrorBox.S"><short>Текст сообщения об ошибке</short> </element><element name="ErrorBox.S"><short>Текст сообщения об ошибке</short>
</element> </element>
<element name="rxValueInteger"><short>Check value is integer</short>
</element><element name="RxGetKeyboardLayoutName"><short>function return current keyboard layout name</short>
</element><element name="InitRxLogs"><short>init handlers for rx loging functions</short>
</element><element name="RxDefaultLogFileName"><short>return default logfile name</short>
</element>
</module> </module>
</package> </package>
</fpdoc-descriptions> </fpdoc-descriptions>

View File

@ -100,6 +100,7 @@ procedure InitRxLogs;
function RxGetKeyboardLayoutName:string; function RxGetKeyboardLayoutName:string;
function RxMessageBeep(AStyle:TRxMsgBeepStyle):boolean; function RxMessageBeep(AStyle:TRxMsgBeepStyle):boolean;
function rxIsValueInteger(AValue:string):boolean;
implementation implementation
uses uses
@ -318,6 +319,15 @@ begin
{$ENDIF} {$ENDIF}
end; end;
function rxIsValueInteger(AValue: string): boolean;
var
V:Int64;
C:integer;
begin
Val(AValue, V, C);
Result:=C = 0;
end;
function GetDefaultSection(Component: TComponent): string; function GetDefaultSection(Component: TComponent): string;
var var