, checking its length, and then prompting the user to either accept the truncated name (eg much_too_long_name would become much_too_long_n) or to re-enter a shorter name. A simple looping prompt. You would do something similar if you were looking for a number and the user entered a string.