Conditional compilation using global constants 
Author Message
 Conditional compilation using global constants

I need to use conditional compilation in my latest project.  I want to
use a constant (defined by #Const) in the #If statement, but conditional
constants apparently aren't global in scope.  I have a VB book that says
there's a way around this by using the "Advanced" tab under the
"Options" menu entry.  However, I can't figure out exactly what to enter
into the "Conditional compilation arguments" field, and the book doesn't
say.  Anyone know how to do this?

Thanks in advance,

Craig C.



Fri, 31 Dec 1999 03:00:00 GMT  
 Conditional compilation using global constants



<snip>

Quote:
>I can't figure out exactly what to enter
>into the "Conditional compilation arguments" field, and the book doesn't
>say.  Anyone know how to do this?

>Thanks in advance,

>Craig C.

Hi,
        In VB4 you can enter a colon-delimited list.  For examble:

CondConst = -1 : Const2 = -1

It doesn't seem to like "True" or "False" though so you can use -1 and
0.

HTH
--
Paul Marshall
pmarshal at peop dot tdsnet dot com



Mon, 03 Jan 2000 03:00:00 GMT  
 Conditional compilation using global constants

yes, under Tools|Options|Advanced enter something like the following for
Conditional Compilation Arguments...

PDP_CLIENT_APP = -1 : CONMERGE_APP = -1 : CUSTOM_STARTUP = -1

setting to -1 results in TRUE evaluation, setting to 0 or omitting results
in FALSE evaluation

constants must be seperated by ' : ', i.e. SPACE COLON SPACE

the use like this...

#If PDP_CLIENT_APP Then
.....
#End If


Quote:
> I need to use conditional compilation in my latest project.  I want to
> use a constant (defined by #Const) in the #If statement, but conditional
> constants apparently aren't global in scope.  I have a VB book that says
> there's a way around this by using the "Advanced" tab under the
> "Options" menu entry.  However, I can't figure out exactly what to enter
> into the "Conditional compilation arguments" field, and the book doesn't
> say.  Anyone know how to do this?

> Thanks in advance,

> Craig C.



Tue, 04 Jan 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. global conditional compilation constants in Access 2002

2. conditional compilation constants

3. can you change conditional compilation constants in c0de?

4. public conditional compilation constant

5. Using API with Win16 and Win32 but conditional compilation is not available

6. Access 97: MDE ignores Conditional Compilation Arguments

7. Conditional Compilation

8. Conditional Compilation Arguments and MDE

9. Dynamic Conditional Compilation Question

10. Conditional Compilation Help

11. Conditional compilation to run Word2000 and 97 code under Word97

12. Conditional JIT compilation?

 

 
Powered by phpBB® Forum Software