AsMath library error during import of a project from AS4.12 to as6.0.2.177

I have a project which i created in AS4.12 with XEM1611 CPU+X20IF1043 module.
I used AsMath library for a DecToHex conversion Function.( which i found here in the forum) See below for the code. I added the AsBrMath library in AS6 and replaced “fmod” function with “brmfmod”. But i get these error messages:

image

I removed AsMath library completely from the project . Do anyone have any idea what this could be?


(* Converts DINT to String, in hexadecimal *)
FUNCTION Dec2HexStr
	
	division := value;
	pvarStr ACCESS pString;
	
	WHILE division <> 0 DO
		
		zReal := brmfmod(division, 16);
		division :=  division / 16;
		
		z := REAL_TO_USINT(zReal);
		
		CASE z OF
			0: zStr := '0';
			1: zStr := '1';
			2: zStr := '2';
			3: zStr := '3';
			4: zStr := '4';
			5: zStr := '5';
			6: zStr := '6';
			7: zStr := '7';
			8: zStr := '8';
			9: zStr := '9';
			10: zStr := 'A';
			11: zStr := 'B';
			12: zStr := 'C';
			13: zStr := 'D';
			14: zStr := 'E';
			15: zStr := 'F';  
		END_CASE;
		
		varStr := CONCAT(zStr, varStr);

	END_WHILE;
	
	IF value = 0 THEN
		varStr := '0';
	  
	END_IF;
	
	pvarStr := varStr;	
	
END_FUNCTION

Maybe you added a dependency to the library in which you declared the function.
You can check this by right-clicking the library and going to the properties. There you have a tab ‘dependencies’.

If this is the case, remove it (maybe add AsBrMath) and recompile.

Hi Jan.. perfect solution. I didnt know such property options were even available. Learned something new. Thanks Jan

1 Like