|
|
|
|
|
- Overview
- Details
- Brackets
- Square brackets
- Comma
- Semicolon
- Colon
- Dot
- Double dot
- Triple dot
- Double slash
The following are additional operators: Brackets 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:
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:
- 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:
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
PROCEDURE MaProc(param1 is int,
param2 is int,
param3 is int)
MaProc(5,
DateToInteger(sRécupèreDate),
0)
Info("a",
"b")
- the right operands for the arithmetic and logical operators
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:
MaChaîne is string = "WINDEV est formidable"
IF Position(MaChaîne, "W")<>0 THEN
Info("trouvé")
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 <> "" 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..
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|