zornaq Posted December 14, 2003 Posted December 14, 2003 I'm trying to do the following: $x=20 $y=1-$x/100 and the number I get should be decimal 0,8. All I get is 1. What is wrong? Do I need to use Float or something? :iamstupid:
Administrators Jon Posted December 14, 2003 Administrators Posted December 14, 2003 Yeah, you need to force the numbers into float mode: $x=20.0 $y=1.0-$x/100.0 Actually, I'm just in the middle of changing this anyway (literally hacking the code now ) so it will work like you expected in your original code. Us developers easily forget that general scripters aren't always familiar with the integer/float differences. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now