"True" and "False" as predefined constants?


Recommended Posts

In the DAQFactory user's guide (p. 111), "True" and "False" are referred to as "predefined constants":

For example, in DAQFactory, False is equivalent to the constant 0, while True is equivalent to the constant 1. These are predefined constants.

My understanding was that this meant that I could use "True" and "False" for boolean values rather than "1" and "0". But when I tried to type things like:

private bFlag = False

I got the error "C1000: Channel or function not found: Line 6 - Unable to perform quick Sequence action".

So, I decided to define these constants myself by adding an auto-start sequence "MyConstants" with the code:

Define False = 0
Define True = 1

Now that I have this sequence I've been able to use "True" and "False" as I expected. But I'm still unclear as to whether this is supposed to be necessary on my part. Shouldn't "True" and "False" be globally available (like "NULL") without me doing this? Is there any way to enable these "predefined constants" without an explicit definition?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.