PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Modulo (Reserved word)
In french: Modulo
Returns the remainder of a division.
Note: Modulo can be used as keyword or as WLanguage function.
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.
Example
// Retrieve the remainder of division
DivisionRemainder = modulo(21, 4) // DivisionRemainder is set to 1
// Equivalent to: DivisionRemainder = 21 Modulo 4
Syntax

Modulo function Hide the details

<Result> = Modulo(<Dividend> , <Divisor>)
<Result>: Integer
Remainder of division.
<Dividend>: Integer
Dividend of division.
<Divisor>: Integer
Divisor of division. A WLanguage error occurs if this parameter is set to 0.

Modulo keyword Hide the details

<Division Remainder> = <Dividend> Modulo <Divisor>
<Division Remainder>: Integer
Remainder of division.
<Dividend>: Integer
Dividend of division.
<Divisor>: Integer
Divisor of division. A WLanguage error occurs if this parameter is set to 0.
Component : wd240mat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Last Day / Último dia do Mês
Procedure LastDay(nDia28293031)

IF nMes = 1 THEN
nDia28293031 = 31
ELSE IF nMes = 2
IF (modulo(nAno,400) = 0) OR ( modulo(nAno,4) = 0 AND modulo(nAno,100) <> 0)
nDia28293031 = 29
ELSE
nDia28293031 = 28
END
ELSE IF nMes = 3
nDia28293031 = 31
ELSE IF nMes = 4
nDia28293031 = 30
ELSE IF nMes = 5
nDia28293031 = 31
ELSE IF nMes = 6
nDia28293031 = 30
ELSE IF nMes = 7
nDia28293031 = 31
ELSE IF nMes = 8
nDia28293031 = 31
ELSE IF nMes = 9
nDia28293031 = 30
ELSE IF nMes = 10
nDia28293031 = 31
ELSE IF nMes = 11
nDia28293031 = 30
ELSE IF nMes = 12
nDia28293031 = 31
END

result nDia28293031
BOLLER
07 Oct. 2019