myredeemerlives Posted October 2, 2005 Share Posted October 2, 2005 (edited) I ain't got nuttin betta ta do, so I just made this peice a crap here: It retrieves the digit of a numby poo, in a non-string like manner. func GetDigit($num, $dig) $numpy = $num for $i = 1 to $dig $mumpy = mod($numpy, 10) $numpy = int($numpy / 10) next return $mumpy[/indent] endfunc func DigitCount($num) return int(log($num)) + 1 endfunc I didn't test it so I don't know if it works or not, you check. I wrote this write into here off the top of my slow brain. I am pretty sure it works, because well, I wrote it. Edit: Another thing, it counts from the right. So 1 is the first digit on the right. 2 is the seccond digit from the right. Forgive me of mistakes however, I haven't used AutoIt in awhile. I been to wrapped up in C++. Edited October 2, 2005 by myredeemerlives Link to comment Share on other sites More sharing options...
myredeemerlives Posted October 2, 2005 Author Share Posted October 2, 2005 I ain't got nuttin betta ta do, so I just made this peice a crap here:It retrieves the digit of a numby poo, in a non-string like manner.func GetDigit($num, $dig) $numpy = $num for $i = 1 to $dig $mumpy = mod($numpy, 10) $numpy = int($numpy / 10) next return $mumpy[/indent] endfunc func DigitCount($num) return int(log($num)) + 1 endfuncI didn't test it so I don't know if it works or not, you check. I wrote this write into here off the top of my slow brain.I am pretty sure it works, because well, I wrote it.Edit: Another thing, it counts from the right. So 1 is the first digit on the right. 2 is the seccond digit from the right.Forgive me of mistakes however, I haven't used AutoIt in awhile. I been to wrapped up in C++.Its the best code ever right? Link to comment Share on other sites More sharing options...
jefhal Posted October 3, 2005 Share Posted October 3, 2005 (edited) It got lumpy at this line, so I put a crumpy( before the part that was bumpy, and then it was all humpy dory... return $mumpy;[/indent] Edited October 3, 2005 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
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