I am attempting to write a program that expects the value of a specific field to be a five-digit zip code. Logically, this should be a completely numeric value, but as I'm using a text field, it is possible for the end user to put anything in there. I'm trying to figure out how to stop this.
Is there any built-in command in Delphi that can be used to check whether or not the contents of a string are completely numeric, without throwing a major exception? Or do I need to start breaking out the try/except blocks to cover against this possibility?
I've checked the Delphi help file included in my installation, but there doesn't seem to be anything that can do what I'm after...or if there is, I have no clue what to look under.
Can anyone (and would someone) please tell me either a command that can do what I'm trying to do, or someplace else to try looking for such a command? Or, failing that, please let me know it is impossible without throwing try/except blocks around?
Thank you for your consideration,