How to use /define?

  • Thread starter Thread starter Siegfried Heintze
  • Start date Start date
S

Siegfried Heintze

I would like to create two versions of the same program without altering the
source code. Certainly in C++ (and I believe C# too) I can say

cl /D prompt

or

csc /d:prompt

on the command line and then in the source code

#ifdef prompt

#endif

Now I see that vbc has a /define for the command line. How may I access this
inside the VB program at run time (or even compile time) to do things
differently?

Thanks,
Siegfried
 
Now I see that vbc has a /define for the command line. How may I access this
inside the VB program at run time (or even compile time) to do things
differently?

Pretty much the same way, except unlike C# the symbols in VB have
values.

Vbc /define:PROMPT=1

#If PROMPT = 1
....
#End If



Mattias
 
Back
Top