UPSman2 Posted April 9, 2008 Posted April 9, 2008 ok so maybe im having a dumb day, but why when i execute this script it returns 03A5FF18 instead of 3A60000, why? $div = 0x3A60000 / 0xDF8 $a1 = "0x" & Hex($div) $a2 = $a1 * 0xDF8 MsgBox(0,"",Hex($a2))
TheCreator Posted April 9, 2008 Posted April 9, 2008 What I do with something like this is just walk thrhough the code. $div = 0x3A60000 / 0xDF8 You're dividing hex. try this on a calculator, and see if it's what you expect. $a1 = "0x" & Hex($div) don't think you need the 0x there. $a2 = $a1 * 0xDF8 You multiply it by what you divided. MsgBox(0,"",Hex($a2)) $a2 is already hex. your converting what you have, to hex again ~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions.
UPSman2 Posted April 9, 2008 Author Posted April 9, 2008 (edited) autoit returns hex equations in decimal format, and yes i do need the "0x" thx for reply though Edited April 9, 2008 by UPSman2
UPSman2 Posted April 9, 2008 Author Posted April 9, 2008 sorry for double post, but i think its just hex doesnt carry decimals and just rounds... thus my equation is wrong *cry*... o well
Richard Robertson Posted April 9, 2008 Posted April 9, 2008 Hexadecimal is used for integers most commonly. I don't know how you'd represent a floating point number in hex.
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