The conditional choice structure of easy language basic tutorials-Easy language

Source: Internet
Author: User

Language structure (sequential structure, conditional choice structure and cyclic structure) is the core of the process programming language, however, because these three kinds of programming structure are in line with human thinking, so it is fully supported and applied in the language of object-oriented programming. It can be said that the implementation of any function, are inseparable from these three kinds of programming structure. Here is a study of the language structure of the conditions of the specific use of the structure.

Method/Step

First, let's take a look at the two forms of conditional choice structure in an easy language. In order to illustrate the problem, the small compilation has made a comparison diagram as shown in the figure.

According to the comparison, we can get two rule:

1. " If a conditional statement executes the next statement immediately after the condition is judged to be true.

2. " Executes the statement at the flow line if the true conditional statement only has a condition that is true.

The following small series is an example to explain the specific use of conditional selection structure:

Create a Windows window program and draw a human-computer interface, as shown in the figure.

Next, add a "clicked" Event for the button component.

In the Assembly window, enter the "if" code as shown in the figure and tap the "Run" button.

You can test the effect.

Now let's Test the "If True" code:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.