Log in

View Full Version : Float in MPLAB


capenga
16-02-2005, 14:01
How can I use float variables in MPLAB?? I've tried, tried, tried, but really don't know how to do it...

Someone knows how?

cbolin
18-02-2005, 06:44
Hi,
Not sure what you are really asking. Are you trying to create a float type variable, load it with a value and use it in an equation? Are you getting errors when you do this?

Here is a short snipped of code using a float. Let us know if you are asking something different.


float number = 2.314;
float answer;
answer = number * 1.5;


Regards,
ChuckB