AQA COMP1 PEST 1b Validating GetMainMenuChoice Type Check

preview_player
Показать описание
The program will crash if the user enters any non integer. Add a tryCatch statement to apply a Type Check Validation
Рекомендации по теме
Комментарии
Автор

this will work fine for a simple type check... Obviously you would want to put it in a loop so the user could re-enter the I can't see how you could use this system for file errors? Try catch is a fairly well used construct in a number of languages... It's probally worth you being able to use both ways.

thx for the comments. hope you are finding the vids useful :)

joemccarthyholland