ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Errors / WLanguage errors
  • Reason
  • Correction
  • Examples
  • Two constants are used in the same process with the same value
  • A constant is defined in the code of the project then in the initialization code of a window
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
Error 123: The constant already exists
Reason
You are trying to declare a constant that was already declared in the project or in the current window.
Correction
Rename one of the constants or delete the useless declaration.
Examples

Two constants are used in the same process with the same value

Code triggering the error
// -- Initialization code of project
CONSTANT B=5
 
CONSTANT
B = 5
END
Possible correction
One of the declarations is useless. Delete the extra constant.
// -- Initialization code of project
CONSTANT B=5

A constant is defined in the code of the project then in the initialization code of a window

Code triggering the error
// -- Initialization code of project
CONSTANT B = 5
 
// -- Global declarations of the window
CONSTANT
B = 7
END
Possible correction
Rename the second declaration.
// -- Initialization code of project
CONSTANT B = 5
 
// -- Global declarations of the window
CONSTANT
D = 7
END
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help