ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage syntax / Operators
  • Overview
  • Details
  • Brackets
  • Square brackets
  • Comma
  • Semicolon
  • Colon
  • Dot
  • Double dot
  • Triple dot
  • Double slash
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Other operators
Overview
The following are additional operators:
  • "(" and ")"
Brackets
  • "[" and "]"
Square brackets
  • ","
Comma
  • "."
Dot
  • ":"
Colon
  • ";"
Semicolon
  • ".."
Double dot
  • "..."
Triple dot
  • "//"
Double slash
Details

Brackets

Brackets are used to:
  • Group the different elements of an operation while specifying the priority order. For example:
    IF (A1-B1)*5 THEN ...
  • Specify the different parameters of a WLanguage function. For example:
    dCopyImage(Image1, Image2)

Square brackets

Square brackets are indexing operators. They are used to easily identify the indexed objects.
For example:
  • Element of an HFSQL Array item. Example:
    Client.Adresse[1]
  • Element of an array defined in WLanguage. Example:
    MonTableau is array of 5 strings
    MonTableau[1] = "Dupond"
  • Combo Box, List Box, Table, Radio Button or Check Box control in a window. Examples:
    • Combo Box control:
      MaCombo[1] = "Montpellier"
    • Check Box control:
      Interrupteur[1] = True

Comma

The comma is used to separate:
  • Different declarations of variables of the same type performed on the same line. For example:
    MonExemple1, MonExemple2 are strings
  • The different parameters of a WLanguage function. For example:
    dCopyImage(Image1, Image2)

Semicolon

The semicolon is used to separate the different statements written on the same line. For example:
I, J are int; MaChaîne is string

Colon

The colon is used to access the members and methods of the objects.
A double colon is used to access the global members and the global methods of a class.

Dot

The dot is used to access a subelement. For example:
  • Access to a window field: MyWindow.DateEntryField
  • Access to a window's global variable: MyWindow.gDuration
  • Access a file item: Customer.Name
  • Access to a table column: Table.Column1
  • Access to properties of an advanced type: MagglConnexion.Email
  • Accessing field properties: MyField.BackgroundColor = LightRed
  • Access to a function of a control, window, report or page, using prefix syntax..

Double dot

Double dots are used to access a property of a control, window, report, file, item or variable. For example:
ASC_Ascenseur..MaxValue = 200
FEN_FraisDePort..Title = "Fenêtre de saisie des frais de port"
MyReport..BottomMargin = 20
MaPolice..Name = "Arial"
It can be replaced with a single dot.

Triple dot

The "..." operator (triple dot) is used to continue a logical line over the next physical line. For example:
IF (CodeFamille="LV") AND ...
	(CodeFamille="MO") THEN
	Traitement
END
LIB_Libellé = "Veuillez saisir le "+...
	"nom du client."
The "..." operator must necessarily be used at the end of a line (and not in the middle of a line).
No character must be found after the "..." operator (except for comments).
From version 12, the "..." operator is no longer required to continue over the next line:
  • the parameters of functions or procedures
    // Prototype de procédure
    PROCEDURE MaProc(param1 is int,
    	param2 is int,
    	param3 is int)
    // Appel de procédure
    MaProc(5,
    	DateToInteger(sRécupèreDate),
    	0)
    // Appel de fonction WLangage
    Info("a",
    	"b")
  • the right operands for the arithmetic and logical operators
    // Opérateurs arithmétiques (+, -, /, *) et logiques (ET, OU)
    num is int = 5 + 
    	6
Remarks:
  • The Ctrl + Enter shortcut automatically adds the "..." characters before going to the next line.
  • For more details, see Multiline strings.

Double slash

Double slashes comment out the text that follows. This text will be ignored when compiling the code and when running the project. For example:
// Effectue une recherche dans une chaîne
// Déclaration
MaChaîne is string = "WINDEV est formidable"
// Test
IF Position(MaChaîne, "W")<>0 THEN
	Info("trouvé")	// Affiche le résultat
END
To comment out one or several lines of code, press:
  • Ctrl + / (on the numeric keypad).
  • Ctrl + shortcut: (useful for laptops).
To uncomment one or several lines of code, press:
  • Ctrl + Shift + / (on the numeric keyboard).
  • the shortcut Ctrl + Shift +: (useful for laptops).
Remark:
  • Double slashes comment out the entire line.
  • To comment out a part of the line, you can also use:
    • "/*" to indicate the start of a comment.
    • "*/" to indicate the end of a comment.
    In this case, you can insert a comment in the middle of a line of code. For example:
    IF Client.Email <> "" /* _and_ Client.VIP = True */ THEN
    You can comment out a section of a line of code by selecting it and pressing Ctrl + /. You will see the /* and */ characters at the beginning and end of the commented section..
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help