Tuto WINDEV 25
34 Part 1: Discovering WINDEV Remark The programming language supplied with WINDEV is named WLanguage. It is a 5th-generation language (5GL) that includes highly sophisticated commands. Main WLanguage conventions • No ending character for end of line is used in WLanguage. • The ’//’ characters are used to comment out code lines. These code lines are not interpreted. They provide better code readability. • In the WLanguage functions, the parameters passed to the function are enclosed in brackets. • The coma character corresponds to the separator. • WLanguage is not case sensitive. • The "space" characters are not interpreted. • The dot is the decimal separator. • The name of WLanguage functions is in English. It is available in French. • The name of WLanguage functions is using a prefix in order to group the functions by family ("Win" for the functions handling windows, "email" for the functions handling emails, ...). 1. Select the "Display" Button control with the mouse. 2. Display the popup menu of control (right mouse click). 3. Select "Code". This option opens the WINDEV code editor. This editor is used to type all WLanguage statements. Remark The code editor proposes different events for each type of control. These are the WLanguage events related to the control. Thus, two events are displayed for the Button control: • Initializing, • Click, run when the user clicks the button. Remark: Additional events can be added if necessary. 4. Write the following WLanguage code in the "Click BTN_Display" event: Info("Hello ", EDT_FirstName) Note about the assisted input : As soon as the first two characters are typed, WINDEV proposes all words of WLanguage vocabulary containing these characters. The assisted development is a very powerful feature. No more mistakes when entering the name of an element: the syntax errors are reduced. All you have to do is select the requested word and press Enter to validate. You can focus on the algorithm. Remark This is why the code style is so important. All elements handled in the application code use the same standard so they can be easily identified when writing code.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==