Gast
#1772782
Hey Guys Having a problem to convert a Float to a byte. Used language is Mikrobasic Pro 2010. Having this code: Dim DataFloat as Float Dim DataByte as Byte DataFloat = 40.000 DataFloat = DataFloat * 6.375 // Scale 40 to 8bit DataByte = DataFloat Now Databyte should be 255. But it isn't. How can I get the number befor the point? DataFloat is generated from a calculation and can not be normal integer, or so.