It is not always that you get to choose one out two options. Many a times you might need to choose one out of multiple options. In such a case, one option for you is to test every option and then depending on the result, you select the favorable option. For example, while driving, when you reach a cross road or a junction, you have to select a road that leads to the destination. If you do not know the exact turn and the junction does not have proper direction board, you would take a random turn, drive some distance and check with someone about the direction. If you still don’t get the correct directions, you would like repeat the same with each turn till you get the correct direction.
However, if either you have a GPS navigation system or a direction board on the junction displays your destination, then you can straight away take the desired road for your onward journey.
Similarly, on a switch board, you either test each switch on it to check the device it switches on and off or if you know the respective device connected to a switch, you can straight away use the switch.
In most of the programming languages, you can use a case construct that enables a user to select one of the available options. The naming convention or format of the case construct might differ according to the programming language, but the underlying concept remains the same. A case construct enables the user to run a specific set of instructions in a program.
A case construct has two components: Evaluation, which verifies the value of a variable and body that defines various blocks of statements that should be run based on the value of the variable.
Auf dieser Seite können Sie das Online-Video Programming Basics – Using a Case Construct in Pseudocodes mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Let's Simplify Computers with MrigVats Learning 10 Januar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 4,510 Mal angesehen und es wurde von 26 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!