ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Administrative number functions
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
Brazil.CheckCNPJ (Function)
In french: Brésil.VérifieCNPJ
Checks the validity of a CNPJ number (company identification number in Brazil).
Example
// Check a variable
MyCNPJNumber is string = "43337004000172"
Brazil.CheckCNPJ(MyCNPJNumber) // Returns True
 
// Check a control
EDT_CNPJNumber = "ABC"
Brazil.CheckCNPJ(EDT_CNPJNumber) // Returns False
// Check a variable
MyCNPJNumber is string
MyResult is boolean
MyResult = Input("Enter CNPJ number: ", MyCNPJNumber)
IF Brazil.CheckCNPJ(MyCNPJNumber) = False THEN
Info("Invalid CNPJ number")
END
Syntax
<Result> = Brazil.CheckCNPJ(<Number to check>)
<Result>: Boolean
  • True if the specified element contains a valid CNPJ number.
  • False otherwise.
<Number to check>: Control name or string variable
CNPJ number to check. This parameter can correspond to:
  • the name of a string variable.
  • the name of a control.
Component: wd290std.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/07/2023

Send a report | Local help