Easy Language Basic Tutorial Simple code writing _ Easy language

Source: Internet
Author: User

To make your own program run, you need to write code, I will take a simple program as an example, to explain the code writing process

Code writing process

The function of my small program is that when I click on the button is, the interface will appear "chasing Little talent"

To achieve this function, the first mouse to double-click the Click button to enter the program editing interface

The complete code for this subroutine is:

This subroutine is expressed in Chinese, meaning: When the button is clicked 1 o'clock, the title of the label 1 becomes "Chasing the little man!" ”。 We can read "label 1 title" as "title of label 1". It can be seen that easy language is very close to human natural language, especially Chinese own language.

After writing, click the Run button to see if the software appears to be the result you want.

I clicked the click button, the interface appeared "chasing small talent" of the 5 words, indicating that my program has reached my requirements, as shown in the following figure. After watching the effect, don't forget to click the Stop button

Code writing principle

The line of code we add is called an assignment statement in an easy language because it has an "=" number in the middle, and the meaning of the assignment statement is to assign the property value of the expression to the right of the equal sign to the variable on the left side of the equal sign (an unfixed amount).
The right side of the equals sign is a text that, when used to refer to text-type data in an easy language, is enclosed in double quotes as an identifier to distinguish other types of data

The relationship between the person who operates the program and the button 1 is "click" and "hit", which makes the connection between the two, and it becomes an interface for people to manipulate programs and send instructions. In accordance with the physical principle of "the movement of things in relation to each other", this program produces the corresponding movement under the "click" condition, such as label 1. title = "Chasing small talent" and so on. "Click" or "clicked" is called "event" in the program language. Windows programs are all event-driven, and an event constitutes a subroutine.

This article is first here, the next article we will learn to create a module

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.