Tuto WINDEV Mobile 25

82 Part 4: Programming concepts • Example of multiple declaration: LastName, FirstName are strings • LastName, FirstName represent the names of variables. • are is used to declare a set of variables. • strings represents the type of variables. When the variable is declared, you have the ability to assign it (or to give it a value). For example: // Assign a currency variable Price = 1256.67 // Assign a string variable LastName = “Doe” The = operator is used to perform this assignment. Remark In WLanguage, the " character (double quote) is the character used to delimit a character string. In the above example, the doubles quotes are used to assign the Doe value to the LastName variable. The variable content can be read and handled: all you have to do is use the name given to the variable to access it. The following example is used to read and display the content of Price variable on the screen: Info(Price) The types of variables The variable type is used to specify the kind of information that will be stored in the variable. The most common types are: • boolean (True or False), • string ("Doe"), • integer (1234), • currency (12,32), • real (7,766666), • etc. Important Use the type corresponding to the information that must be stored. Therefore, you will optimize memory and avoid calculation or process errors when using variables in WLanguage functions. Most of these types of variables will be used in this tutorial. See the online help regarding the relevant type for more details.

RkJQdWJsaXNoZXIy NDQ0OA==