What I have is a Switch Case where I allow the user to enter up to 7 characters to be processed. But they are free to enter fewer than 7, As it happens right now, if the user enters IX and hits enter, the system will just wait for the final 5 characters to be entered.
So I put in a default case that would stop the process if they entered any character not featured in the Switch Case statement. So for example, p is a character not featured.
so IXp
is what the user would have to enter right now, to get a value for IX without having to enter 5 more characters.
Enough of that:
~~~~---THE QUESTION---~~~~~~~
Is it possible/How can I make it so that even though I prompt the user to enter 7 characters, they can still enter only 6 or less and simply press enter to finish the process.
Such as, simply entering 12 or IV and hitting enter to end the process.
(I know this sounds confusing. But I hope someone understands wtf I'm talking about.)