[r2]: / trunk / Functions / ISNUMBER / svnobj  Maximize  Restore  History

Download this file

6 lines (6 with data), 4.4 kB

Gx_l0!0…jüo7gIñªÑtRHSystem.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTextÒ(*=======================================================================================================ISINTEGER()VAuthor: Tim Van Meppelen, Pro Electric Inc.(timv@proelectric.com"Date: Oct 2, 2018Þcheck if a string contains a valid number, allows for "-" at the beginning of the string, and one "." characterÔ========================================================================================================*)&FOR i:= 1 TO 256 DO"	CASE In^[i] OF 		ASCII.NULL: 	//end of string		EXIT;	ASCII.MINUS:T	//only allow a "-" in the first position			IF (i=1) THEN &			ISNUMBER:= TRUE;!		ELSE"(			ISNUMBER:= FALSE;#			EXIT;$		END_IF%	ASCII.DOT:&>	//only allow one decimal point',		IF founddecimal THEN(Z		//already found one decimal, can't have two)P		//first decimal point found, allow one*.			founddecimal:= TRUE;+@	ASCII.NUMBER_0..ASCII.NUMBER_9:,$		ISNUMBER:= TRUE;-
	ELSE.^	//all other characters are not part of numbers/&		ISNUMBER:= FALSE;0	END_CASE1END_FOR2Interface3L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}40FUNCTION ISNUMBER : BOOL5VAR_INPUT6N	In:		POINTER TO ARRAY[1..255] OF BYTE;7END_VAR8VAR9	i:				UINT;:(	founddecimal:	BOOL;;"UniqueIdGenerator<104=POULevel>L{8e575c5b-1d37-49c6-941b-5c0ec7874787}?Standard@ ChildObjectGuidsA8System.Collections.ArrayListB,AddAttributeSubsequentCboolÐÐ-ÐÐ	E
(ÐÐ
­ÚÐ-ÐÐ
­	ÚÐ-ÐÐ
­
ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­"ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­WÚÐ-ÐÐ
­XÚÐ-ÐÐ
­YÚÐ-ÐÐ
­DÚÐ-ÐÐ
­JÚÐ-ÐÐ
­QÚÐ-ÐÐ
­RÚÐ-ÐÐ
­SÚÐ- ÐÐ
­TÚÐ-!ÐÐ
­cÚÐ-"ÐÐ
­UÚÐ-#ÐÐ
­KÚÐ-$ÐÐ
­LÚÐ-%ÐÐ
­^ÚÐ-&ÐÐ
­_ÚÐ-'ÐÐ
­aÚÐ-(ÐÐ
­bÚÐ-"ÐÐ
­dÚÐ-#ÐÐ
­gÚÐ-!ÐÐ
­fÚÐ-)ÐÐ
­eÚÐ- ÐÐ
­`ÚÐ-*ÐÐ
­MÚÐ-$ÐÐ
­FÚÐ-+ÐÐ
­GÚÐ-,ÐÐ
­hÚÐ--ÐÐ
­HÚÐ-.ÐÐ
­PÚÐ-/ÐÐ
­EÚÐ-ÐÐ
­0ÚÐ-0ÐÐ
­ÚÐ-1Ð23Ð	E
	ÐÐ
­ÚÐ-4ÐÐ
­ÚÐ-5ÐÐ
­ÚÐ-6ÐÐ
­ÚÐ-7ÐÐ
­ÚÐ-8ÐÐ
­\ÚÐ-9ÐÐ
­ÚÐ-:ÐÐ
­ÚÐ-7ÐÐ
­ÚÐ-Ð;-<Ð=>-?@AÐBC­