SA0132: Implicit signed/unsigned conversionsPermalink

Detects implicit conversions from signed data types to unsigned data types or the other way around.

This message is obsolete now because it is already reported as a warning by the compiler.

Importance: Low

Example

PROGRAM PLC_PRG
VAR
	byTest :BYTE;
	udiTest: UDINT;
	ulktest: ULINT;
	wTest	: WORD;
	lwTest : LWORD;
	siTest	: SINT;
	iTest	: INT;
	diTest : DINT;
	liTest	:LINT;
END_VAR
liTest := ulktest;	// SA0132
udiTest:= diTest;	 // SA0132
siTest := byTest;	 // SA0132
wTest := iTest;	   // SA0132
lwTest := siTest;	 // SA0132

--> SA0132: Implicit signed/unsigned conversion from type 'ULINT' to type 'LINT'
--> SA0132: Implicit signed/unsigned conversion from type 'DINT' to type 'UDINT'
--> SA0132: Implicit signed/unsigned conversion from type 'BYTE' to type 'SINT'
--> SA0132: Implicit signed/unsigned conversion from type 'INT' to type 'WORD'
--> SA0132: Implicit signed/unsigned conversion from type 'SINT' to type 'LWORD'