The Val function turns a string into an integer but allows an error code as a third parameter that indicates the first character in the string that isn;t numeric.