ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Editors / Code editor
  • Overview
  • Simple yet powerful code
  • Variables and types
  • Powerful programming
  • Powerful structured programming
  • FOR EACH
  • Procedural programming
  • Procedures
  • Object-Oriented Programming
  • Embedded database access
  • Handling UI via programming
  • And even more features...
  • Dynamic compilation
  • Defensive programming
  • Multithreading and parallel tasks
  • Cross-platform
  • Execution security
  • Secure memory area
  • External languages
  • Opening
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
WLanguage, WINDEV's native programming language, is powerful, simple and intuitive.
it's a fifth generation language (5GL), which means that it uses very advanced commands.
A WLanguage command can replace dozens or even hundreds of 4GL commands, making programming easier and more reliable.
No more unnecessary complexity, no more incomprehensible APIs, no more useless programming!
Simple yet powerful code
WLanguage is a clear, easy-to-learn programming language, close to natural language. The code is easy to write and proofread. Coding and maintenance are therefore optimized.
FOR EACH Client
Message is Email
Message.Recipient = Client.AdresseMail
EmailSendMessage(Message)
END
The code above demonstrates the simplicity of WLanguage. WLanguage is available in English and French.

Variables and types

Declaring variables is easy and intuitive.
Message is Email
TableauDeClient is array of Clients
Variables are declared easily and on the spot. WLanguage supports standard simple types, including integer, boolean, currency, numeric with up tp 38 significant digits, real number or character string.
Over 20 simple types are available.
For more details, see The different types of variables.
WLanguage comes with a number of advanced types that let you easily manage complex elements: emails, RSS feeds, certificates and signatures, XML documents, planning and calendar resources, etc.
Powerful programming

Powerful structured programming

The essential standard iterative and conditional programming structures are available (FOR i, LOOP, WHILE, IF, SWITCH, etc.) but each one of them has been simplified for efficient and quick code writing.
For example, variable declarations in "POUR i" loops are implicit, SELON loops can use all the Palette of WLanguage comparisons, etc.
SWITCH RéférenceLivre
CASE "A" <= * < "H": Etage = 1
CASE "H" <= * < "P": Etage = 2
CASE >= "P": Etage = 3
END
You can use complex intervals to define each CASE.

FOR EACH

FOR EACH" Rounds run through all elements of a set, e.g. all a data file records, all array elements, all selected fields of a list, all substrings of a string, etc..
FOR EACH email NOT READ OF ConnexionServeurMail
END
FOR EACH SELECTED ROW OF ListeOption
END
FOR EACH Client where Pays = "France"
END
Procedural programming

Procedures

WLanguage's procedural programming is extremely powerful. Procedures let you organize your code logically.
A WLanguage procedure can have several parameters and several return values.
The parameters can be optional and their number can vary.
Procedures are recursive.
Their type can be strict or flexible.
Main functionalities supported:
  • Automation (repetition, timer, thread),
  • Multiple syntaxes (dynamic dispatch),
  • Internal procedures (closures),
  • Named parameters,
  • Weak or strong typing,
  • etc.
Procedures include some advanced features. Runtime automation allows you to delay execution: in 1 minute, in 1 hour, after initializations, etc.
The execution of a procedure can also be repeated. A procedure can be located in a Timer or a Thread.
"Internal procedures" and lambdas allow writing a sub-procedure within a procedure, which allows you to see the code at a glance, without switching between several procedures.
The local variables of the procedure can be used directly in the sub-procedure ("closure").
The internal procedures can be used in all functions that require a "Callback", including asynchronous functions.
Object-Oriented Programming
You can use object-oriented programming with WINDEV. Base class methods can be redefined visually from the project explorer; virtual methods are managed automatically.
Management of the instances' memory is completely automated in most cases, when allocating as well as when freeing memory.
Main features:
  • Classes,
  • Abstract classes,
  • Interfaces (duck typing),
  • Inheritance, multiple inheritance,
  • Reflection,
  • Override (dynamic dispatch),
  • Abstract and virtual methods (polymorphism),
  • Properties (get and set),
  • Constructor,
  • Destructor,
  • Data encapsulation: public, private, protected,
  • Easy programming in 5GL,
  • Automatic freeing,
  • "is one" operator and downcast,
  • Weak reference,
  • Deep copy,
  • etc.
Embedded database access
WLanguage handles every aspect of database management. The compiler automatically detects the database structure, and allows you to easily handle the different items of the current record
Programming is done in SQL or WLanguage.
Cursor programming is very powerful.
HReadSeek(Client, Nom, NomClient)
tapiDial(Client.NuméroTéléphone)

Operations on data require that this data be copied from the database to some variables, modified, saved or reloaded into another format. All these common operations are very easily accomplished thanks to the WLanguage syntax.
The WHERE syntax, for example, allows quick access to the subelements of a base element.
Homonymic copying allows you to copy elements with the same name between objects of different type.
The serialization and deserialization functions let you save and reload the content of complex elements.
Handling UI via programming
UI controls offer many possibilities as soon as they are created in the window editor. Their state and behavior can be modified through programming, via the Control type: 270 display properties (position, width, etc.), as well as the code to run based on the user's actions, can be modified according to your needs.
ControlCreate and ControlClone allow you to create a new control or duplicate an existing control, respectively.
And even more features...

Dynamic compilation

WLanguage is a dynamic language. The dynamic compilation lets you execute code built on the fly.

Defensive programming

Defensive programming consists of testing the inputs and outputs of each procedure in the code itself; any errors detected will only be displayed in "debugging" mode.
WLanguage features powerful debugging functions dbgAssert, dbgCheckEqual, dbgCheckDifferent, dbgCheckTrue, dbgCheckFalse, etc.. The creation of unit tests makes it possible to test an application at any time.

Multithreading and parallel tasks

To take advantage of the power of modern multi-core processors and make your applications faster, WLanguage offers advanced thread management.
Parallel tasks are used to split a long process into several shorter processes that will be run in parallel, taking advantage of modern processors. Variables are automatically protected. There are different synchronization techniques available:
  • critical sections,
  • mutex,
  • semaphores,
  • signals,
  • etc.

Cross-platform

Code written in WLanguage is cross-platform:
  • 32 or 64-bit,
  • Windows,
  • Linux,
  • Android,
  • iOS,
  • Java,
  • JavaScript,
  • PHP ETC,
  • etc.
Components can be shared among several platforms.

Execution security

The WLanguage security mechanism prevents any data corruption. WLanguage handles errors (non fatal) and exceptions (fatal). Errors and exceptions can be managed automatically or through programming.

Secure memory area

Access to memory areas is controlled, which limits the risks of buffer overflow.

External languages

You can call code written in an external language from WINDEV or vice versa: Java, C++, C#, Fortran, VB, etc.

Opening

You have access to all features and standards: API, DLL, COM, ActiveX, .NET, J2EE calls, events, etc..
It is easy to call a C or C++ DLL from a WINDEV application, for example.
Minimum version required
  • Version 7
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/06/2024

Send a report | Local help