From Wikipedia, the free encyclopedia
Jump to: navigation, search
Developer PC SOFT
Appeared in 1992 (latest release date: 2013)
Influenced by BASIC, Pascal, C++
OS Cross-platform (multi-platform) (Windows, Windows CE, Windows Phone, Windows Mobile, iOS, Linux, Android)

WLanguage is an integrated 4GL. The WLanguage functions allow you to create processes for each project, window, page and control. These processes are entered in a dedicated source editor (also called code editor). This editor can be directly accessed from WinDev, WebDev or WinDev Mobile. It enables you to access all the processes of an object.

The programming in WLanguage is used to target a wide range of platforms: Windows, Linux, .NET, Java, Mac, Internet, Intranet, tablet, smartphone, Windows 8 RT, Windows Mobile, Windows Phone, Android, iOS iPhone/iPad.

The variables[edit]

WLanguage proposes two types of variables:

  • the simple types, that can be declared directly.
  • the advanced types, that include one or more variables of simple type.


The different operators are as follows:

  • Logical operators: Examples: AND, OR, NOT
  • Arithmetic operators: Examples: "+", "-", "*", "/", "++", "--", "+=", "-="
  • Binary operators: Examples: BinaryAND, BinaryOR, BinaryNOT and BinaryXOR
  • Comparison operators: Examples: "=", "~=", "<>", "<=", ">=", "<", ">", "~~"
  • Character string operators: Examples: "+", " "and""
  • Operator on address: &amp
  • Operators for control and item indirection: { and }
  • Punctuation operators: Examples: "(" and ")", "[" and "]", "," and "." and ":" and ";", "..", "..." and "//"

WLangage statements[edit]

Several types of composite statements are available in WLanguage:

  • Conditional statements
 - SWITCH: Runs an action or another one according to an expression
 - IF: Selects the action to perform according to a condition
  • Loop statements
 - LOOP: The statement block is repeated endlessly
 - FOR: The statement block is repeated until a limit value
 - FOR EACH: HyperFileSQL browse (full browse, browse with search, browse with filter)
 - WHILE: The statement block is repeated according to a condition
  • Branch Statement: GOTO: B ranches to a given label

Reserved words[edit]

Several WLanguage words are keywords, used to perform some specific actions:

  • Extern
  • Modulo
  • MyFile
  • MyPage
  • MyParent
  • MyPopupControl
  • MyReport
  • MySelf
  • MySource
  • MyWindow
  • STOP

Procedure and function[edit]

A procedure is used to associate an identifier with a statement block. Then, the procedure can be called in a process. A function is used to define a sub-program that performs several statements before returning a value to the calling program. Difference between a procedure and a function:

  • a procedure returns no result.
  • a function returns a result.

In WLanguage, there is no distinction between the procedures and the functions. The procedures and the functions are managed in the same way. A procedure, like a function, may (or may not) return a result. The procedures and the functions can have a fixed or variable number of parameters. The declaration syntax is the same for the procedures and for the functions. The calling syntax is the same for the procedures and for the functions. You have the ability to create overloaded procedures. A procedure (or a function) can be global or local.

Managing exceptions[edit]

When a programming error occurs in an application or in a site, the security mechanism of WLanguage is enabled. An error message is displayed on the end-user computer and the program execution is ended. To lessen the consequences of programming errors, WinDev and WebDev propose several solutions:

  • the display of a custom error message.
  • the mechanism of exceptions. This enables you to customize the management of the error.

Object-oriented programming (OOP)[edit]

WLanguage is an object-oriented language:

  • it supports the objects.
  • the objects have an associated class.
  • the classes can inherit from attributes coming from "super classes".


WLanguage allows you to program in English, in French and in Chinese, examples:

- in English :

sString is string
sString = DateToString(Today())

Info("Today is " + sString)

- or in French :

sString est une chaîne
sString = DateVersString(DateDuJour())

Info("Today is " + sString)

- or in Chinese :

信息("今天是 :"+sString)

- or by mixing up the languages:

sString is string
sString = DateVersString(DateDuJour())
Info("Today is " + sString)

Hello world[edit]

A Hello World program in WLanguage looks like this :

Info("Hello world!")

External links[edit]