Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: VB4,VB5,VB6
Expertise: beginner
Apr 20, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Multiple compilation constants

Visual Basic's documentation does not explain how to specify more than just one conditional compilation constant in the Advanced tab of the Options dialog. The correct way is using a colon as a delimiter, as in:

demo = -1: version = 100
Note that you can only assign integer numeric values, and must use -1 and 0 for True and False respectively. An alternate way to define compilation constants is using the /D switches on the command line when launching the VB5.EXE file:

C:\VB5\VB5.EXE /Ddemo=-1:version=100
In this case you must not use spaces before or after the "=" and ":" symbols. If you are developing different versions of your applications using conditional compilation, you might create two or more shortcut on your desktop or Start menu, each one running the VB environment with a different set of compilation constants.
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date