ZTree.com  | ZEN  | About...  

 Index   Back

"isAnInteger" batch function flaw   [Q]

By: John Gruener     Orlando, Florida  
Date: Sep 17,2017 at 21:29
In Response to: Sorry, pasting "isAnInteger" was a disaster. Please ignore. (Nick Williams)


Very well written and documented function!

The flaw is demonstrated by your "Test number 15". Note that while test 14 "007" is recognized as numeric, test 15 "009" is not. The reason is that any number with a leading zero is treated by SET /A as being octal. Therefore if it also contains the digits 8 or 9 it is considered invalid. And of course it follows that "070" will be interpreted as 56, and "0100" as 64.

- John

Thread locked

Messages in this Thread

95,067 Postings in 11,984 Threads, 350 registered users, 63 users online (1 registered, 62 guests)
Index | Admin contact |   Forum Time: Aug 7, 2020 - 11:56 am EDT  |  Hits:32,931,723  (14,764 Today )
RSS Feed