Tuto WINDEV 25

50 Part 2: The WLanguage basics You also have the ability to assign a string variable with the content of a control handling strings. The following code is used to assign a string variable with the content of an edit control: LastName is string // Assign a string variable // with the content of EDT_LastName edit control LastName = EDT_LastName In addition to the main comparison operators, several powerful operators are used to manage the extractions and concatenations in advanced mode. Some examples: • " + ": to concatenate strings. • " ~= ": to check the flexible equality. Specific WLanguage functions are used to perform various operations: search, extraction, size, switch to uppercase characters, ... Examples: str is string str = "WINDEV is a great tool" // Extract a sub-string from left Info(Left(str, 6)) // Displays "WINDEV" // Extract a sub-string from right Info(Right(str, 4)) // Displays "tool" Remark The different WLanguage functions can be nested. A WLanguage function can be used as parameter of another WLanguage function. For example: Info(Middle(Left(str, 13), 8, 2)) // Displays "is" See the help about the character strings and about the functions for handling character strings for more details. Practical example To handle the different concepts of this lesson, we are going to create different windows. These windows will be created in the "WD My first windows" project. ▶ Open the "WD My First Windows" project if necessary. To do so, in the home page (Ctrl + <), click "Tutorial" and select "My first windows (Exercise)". Caution : WINDEV proposes to open the local copy or overwrite the project with the source version. To continue working on your project started in the previous section, choose "Open the local copy".

RkJQdWJsaXNoZXIy NDQ0OA==