Post
by Coiler » 19 Mar 2021, 10:59
Yeah, I was looking for something that could be used right after reading a value of unknown type from a text file, like in the case of a INI file. Based on the documentation, I assumed IsNumber() probably internally calls IsInteger() and/or IsFloat(), but that's just a guess. If I wanted to be as efficient as possible, I would internally register all of my INI values, including their types, which would tell me exactly how to load them or process them after. But since AHK doesn't discriminate against other types (in all of the situations I've tested), I'm doing it the lazy way and just loading them in as generic values, then taking a best guess with IsNumber().
The entire system was already working with pure strings, which I thought was pretty impressive. Most languages would throw a fit if you tried to multiply two strings.
But I figured one line of code at the beginning might save internal processing throughout the program. And there's always a chance that AHK may become more strict in how it deals with strings and numbers down the road. Especially with the road its currently traveling on.