ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV 2024 feature!
Help / WINDEV Tutorial / Tutorial - WLanguage basics
  • Lesson 1 - WLanguage
  • What is WLanguage?
  • A project to discover WLanguage

Tutorial - WLanguage basics

Lesson 1 - WLanguage
We will cover the following topics:
  • What is WLanguage?
  • How to discover WLanguage?
Durée de la leçon 5 mn
What is WLanguage?
WLanguage is the programming language of WINDEV, WEBDEV and WINDEV Mobile. In this tutorial, we will take a look at the basics of this language: variables, conditional statements, procedures, etc.
WLanguage is a rich fifth-generation language (5GL) that offers many programming possibilities with a robust code editor that makes coding significantly easier.
WLanguage is event-driven. Code is written in the corresponding WLanguage event. For example, this event can be associated with a control, window, page, report, etc. All events are available in the code editor. You can add additional events and manage special cases programmatically.
You can also use object-oriented programming (OOP). Member and method, constructor, destructor, multiple inheritance, virtual method, polymorphism, etc. One lesson in this part is entirely dedicated to OOP.
Programming controls or objects is very simple, using specific functions and/or properties. Simply type the name of the control or object in the code editor to see all the functions or properties that can be used with it.
WLanguage functions that use controls or objects accept two syntaxes:
  • standard syntax. In this case, WLanguage functions start with the name of the corresponding "family" name. Thus, all the functions used to manipulate Table controls start with "Table".
    For example, to add elements in a Table control, you can use TableAddLine, specifying the name of the Table control as the first parameter:
    // Add "Moore" and "Vince" 
    // in the last row of the "TABLE_ProductTable" control
    TableAddLine(TABLE_ProductTable, "Moore", "Vince")
  • prefix syntax.
    In this case, the name of the manipulated element is specified first. With the previous example, we can simply use AddLine on the Table control:
    // Add "Moore" and "Vince" 
    // in the last row of the "TABLE_ProductTable" control
    TABLE_ProductTable.AddLine("Moore", "Vince")
A project to discover WLanguage
In this tutorial, we will focus on the WLanguage code. No UI is required.
To do so, we will create a project (necessary for any programming task with WINDEV). In this project, we will write the WLanguage code directly in the code editor. This code can be tested immediately, by simply clicking "GO".
Warning
This project will be used in the different lessons of this tutorial.
Simply follow these steps to create a project:
  1. Go to the WINDEV home page (Ctrl + <).
  2. On the home page, click "Create a project" and select "Windows or Linux application". The project creation wizard starts. The different steps of the wizard will help you create your project.
  3. The first step of the wizard allows you to select the operating system for which the project is intended. Select "Windows platform" and proceed to the next step of the wizard.
  4. For this tutorial, we are going to create a "blank" project. Select "Create a blank project" and proceed to the next step of the wizard.
  5. WINDEV then prompts you to select the platform options. Keep the default options ("64-bit Windows executable" and "Executable with windows"). Proceed to the next step of the wizard.
  6. The wizard prompts you to enter the project name, location and description. In our case, this project will simply be named "WLanguage".
  7. By default, WINDEV creates this project in the "\My projects\WLanguage" directory.
    You can keep this location or change it via the [...] button.
  8. Click "Finish": the project is created. The new element window appears. Close this window by clicking "X" in the upper-right corner.
Table of contentsNext Lesson
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 11/15/2023

Send a report | Local help