PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
BCCalculateControlCharacter (Function)
In French: CBCalculeCaractèreDeVérification
Returns the check code of a bar code.
Note: This function is not available for the DataMatrix, PDF417 and QR-Code bar codes.
Example
MyBarCode is BarCodes
MyBarCode..Content = "012345678901"
MyBarCode..TypeBarCode = BC_EAN13
ControlCharact is string
ControlCharact = BCCalculateControlCharacter(MyBarCode)
Syntax

Control character of a bar code found in a BarCodes variable Hide the details

<Result> = BCCalculateControlCharacter(<BarCodes>)
<Result>: Character string
Control characters of bar code.
To find out the error details, use ErrorInfo.
<BarCodes>: BarCodes variable
Name of BarCodes variable containing the description of bar code to study.
Caution: Syntax available from version 170069

Control character of a specific bar code Hide the details

<Result> = BCCalculateControlCharacter(<Type of Bar Code> , <Value of Bar Code> , <Extended Code>)
<Result>: Character string
Control characters of bar code.
To find out the error details, use ErrorInfo.
<Type of Bar Code>: Integer
Type of bar code to study (the different types of bar codes supported by WINDEV are presented in Managing bar codes).
BC_CODE128Code128 bar code.
BC_CODE39Code39 bar code.Bar code usable with <Extended Code> corresponding to BC_Extended or BC_Check
The value of the bar code can contain the start and end characters ("*" character). In this case, these characters will be added to the drawing of the bar code and will be printed in the text displayed below the bar code.
If these characters are not found in the value of bar code, they will be automatically added to the drawing of bar code.
However, they will not be printed in the text displayed below the bar code.
BC_CODE93Code93 bar code.Bar code usable with <Extended Code> corresponding to BC_Extended or BC_Check).
BC_CODE11Code11 bar code.
BC_INTER2OF5Interleaved 2 of 5 bar code.Bar code usable with <Extended Code> corresponding to BC_Check.
BC_CODABARCodabar bar code.Bar code usable with <Extended Code> corresponding to BC_Check.
BC_EAN128EAN-128 bar code.
BC_EAN13EAN-13 bar code.Possible values for the bar code:
  • 12 characters,
  • 12 characters + 2 additional characters ("012345678912+22" for example)
  • 12 characters + 5 additional characters ("012345678912+22335" for example)
A control character is automatically inserted after the 12th character.
BC_EAN8EAN-8 bar code.Possible values for the bar code:
  • 7 characters,
  • 7 characters + 2 additional characters ("0123456+22" for example)
  • 12 characters + 5 additional characters ("012345678912+22335" for example)
A control character is automatically inserted after the 7th character.
Versions 18 and later
CB_GS1_128
New in version 18
CB_GS1_128
CB_GS1_128
GS1-128 bar code (new name for the EAN-128 bar code).
BC_MSIMSI bar code.
BC_UPCAUPC-A bar code.Possible values for the bar code:
  • 11 characters,
  • 11 characters + 2 additional characters ("01234567891+22" for example)
  • 11 characters + 5 additional characters ("01234567891+22335" for example)
A control character is automatically inserted after the 11th character.
BC_UPCEUPC-E bar code.Possible values for the bar code:
  • 11 characters,
  • 11 characters + 2 additional characters ("01234567891+22" for example)
  • 11 characters + 5 additional characters ("01234567891+22335" for example)
A control character is automatically inserted after the 11th character.
<Value of Bar Code>: Character string (with quotes)
Value of the bar code to use.
<Extended Code>: Integer constant (or combination of constants)
Characteristics of bar code.
BC_ControlDigitsBar codes containing control characters (valid for the BC_CODE128 and BC_EAN128 bar codes only). By default, the control characters are enclosed between the "<" and ">" characters. In order for these characters not to be interpreted as control characters, they must be doubled.
See The different types of bar codes for more details.
BC_CheckDigitsBar codes containing check characters (valid for the BC_CODE128 and BC_EAN128 bar codes only).
If this option is selected, the BC_ControlDigits and BC_Charsets constants are automatically taken into account.
BC_ExtendedExtended bar code (valid for the BC_CODE39 and BC_CODE93 bar codes only).
BC_IgnoreFormattingIgnores the brackets in a 128 or EAN-128 bar code (valid for the BC_CODE128 and BC_EAN128 bar codes only).
The brackets allow the users to easily read the bar code but they are not drawn in the code.
BC_CharsetsBar code using one or more sets of characters in order to compress the bar code. This set of characters must be defined in the value of bar code.
See The different types of bar codes for more details.
BC_CheckBar code with check characters (valid for the BC_CODE39, BC_CODE93, BC_INTER2OF5 and BC_CODABAR bar codes only).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230barc.dll
Windows Mobile wp230barc.dll
Linux wd230barc.so
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment