ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / Operators
  • Overview
  • Details
  • Brackets
  • Square brackets
  • Comma
  • Semicolon
  • Colon
  • Dot
  • Double dot
  • Triple dot
  • Double slash
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
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:
    Customer.Address[1]
  • Element of an array defined in WLanguage. Example:
    MyArray is array of 5 strings
    MyArray[1] = "Smith"
  • Combo Box, List Box, Table, Radio Button or Check Box control in a window. Examples:
    • Combo Box control:
      MyCombo[1] = "Miami"
    • Check Box control:
      CheckBox[1] = True

Comma

The comma is used to separate:
  • Different declarations of variables of the same type performed on the same line. For example:
    MyExample1, MyExample2 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; MyString 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 control: MyWindow.DateEditControl
  • Access to a global variable of a window: MyWindow.gDuration
  • Access to a file item: Customer.Name
  • Access to a table column: Table.Column1
  • Access to the advanced properties: MygglConnection.Email
  • Access to the properties of a control: MyControl.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:
SCROLL_Scrollbar..MaxValue = 200
WIN_ShippingCost..Title = "Window for entering the shipping cost"
MyReport..BottomMargin = 20
MyFont..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 (FamilyCode="LV") AND ...
(FamilyCode="MO") THEN
Process
END
STC_Caption = "Enter the "+...
"customer name."
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
    // Procedure prototype
    PROCEDURE MyProc(Param1 is int,
    param2 is int,
    param3 is int)
    // Call to a procedure
    MyProc(5,
    DateToInteger(sGetDate),
    0)
    // Call to a WLanguage function
    Info("a",
    "b")
  • the right operands for the arithmetic and logical operators
    // Arithmetic operators (+, -, /, *) and logical operators (AND, OR)
    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:
// Performs a search in a string
// Declaration
MyString is string = "WINDEV is great"
// Test
IF Position(MyString, "W")<>0 THEN
Info("Found") // Displays the result
END
To comment out one or several lines of code, press:
  • Ctrl + / (on the numeric keypad).
  • Ctrl +: (useful for laptops).
To uncomment one or several lines of code, press:
  • Ctrl + Shift + / (on the numeric keyboard).
  • 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 Customer.Email <> "" /* _AND_ Customer.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: 07/03/2023

Send a report | Local help