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