PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use
  • Rules
  • Calculation rules
  • Notes
  • Displaying the result
  • Equivalence
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Arithmetic operators
Use
The arithmetic operators are:
  • "+": Addition (numeric value or string)
  • "-": Subtraction (numeric value)
  • "*": Multiplication
  • "/": Division
  • "++": Increment (numeric value)
  • "--": Decrement (numeric value)
  • "+=": Adding a value to the variable or to the control (numeric or text)
  • "-=": Subtracting a value from the variable or from the control (numeric)
  • Modulo: Returns the remainder of a division
  • "^": Power (equivalent to Power)
Versions 16 and later
Universal Windows 10 App This feature is available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This feature is available for the Windows Phone applications.
Universal Windows 10 App This feature is available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This feature is available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is available for the iPhone/iPad applications.
iPhone/iPad This feature is available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
New in version 18
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Rules

Calculation rules

The different calculations are performed without loss of precision and without being truncated. The flow checks are performed when the result is assigned to a variable.
Notes

Displaying the result

The result of the calculation cannot be directly displayed by the following operators:
  • "++": Increment
  • "--": Decrement
  • "+=": Adding a value to the variable or to the control (numeric or text)
  • "-=": Subtracting a value from the variable or from the control (numeric)
Therefore, this example generates an error during the compilation:
num is int = 10
Trace(num+=1)
To display the result, perform the following modifications:
num is int = 10
num += 1
Trace(num)

Equivalence

  • j ++ is equivalent to j = j + 1
  • j -- is equivalent to j = j - 1
  • j += 3 is equivalent to j = j + 3
  • j -= 3 is equivalent to j = j - 3
We recommend that you use the following syntaxes: "j ++", "j --", "j +=" and "j -=", that are faster than the usual syntaxes.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment