- Square brackets
- Double dot
- Triple dot
- Double slash
The following are additional operators:
Brackets are used to:
- Group the different elements of an operation while specifying the priority order. For example:
- Specify the different parameters of a WLanguage function. For example:
Square brackets are indexing operators. They are used to easily identify the indexed objects.
- Element of an HFSQL Array item. Example:
- Element of an array defined in WLanguage. Example:
MyArray is array of 5 strings
MyArray = "Smith"
- Combo Box, List Box, Table, Radio Button or Check Box control in a window. Examples:
- Combo Box control:
- Check Box control:
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:
The semicolon is used to separate the different statements written on the same line. For example:
I, J are int; MyString is string
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.
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 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.
The "..." operator (triple dot) is used to continue a logical line over the next physical line. For example:
IF (FamilyCode="LV") AND ...
STC_Caption = "Enter the "+...
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
// Call to a WLanguage function
- the right operands for the arithmetic and logical operators
// Arithmetic operators (+, -, /, *) and logical operators (AND, OR)
num is int = 5 +
- The Ctrl + Enter shortcut automatically adds the "..." characters before going to the next line.
- For more details, see Multiline strings.
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
MyString is string = "WINDEV is great"
IF Position(MyString, "W")<>0 THEN
Info("Found") // Displays the result
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).
- Double slashes comment out the entire line.
- To comment out a part of the line, you can also use:
In this case, you can insert a comment in the middle of a line of code. For example:
- "/*" to indicate the start of a comment.
- "*/" to indicate the end of a comment.
IF Customer.Email <> "" /* _AND_ Customer.VIP = True */ THEN
New in version 28
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..
This page is also available for…