LB-Get number

From Vectorlab
Jump to: navigation, search


Function to convert a string in a List Browser to number. By Orso B. Schmid

{ Orso ******************************************** }
{ returns string of a LB row directly converting to nr or returns "0" }
FUNCTION LB_GetNum(d, LB: LONGINT; row, col: INTEGER): REAL;
	VAR
		nr : REAL;
		temp_i : INTEGER;
		temp_s : STRING;
		temp_b : BOOLEAN;
	BEGIN
		nr := 0;
		
		IF GetLBItemInfo(d, LB, row, col, temp_s, temp_i) THEN
			IF NOT validNumStr(temp_s, nr) THEN
				nr := 0;
					
		LB_GetNum := nr;
	END;