LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When is a Boolean not a Boolean?

After creating a few custom Boolean controls, I noticed something odd - wiring a standard Boolean constant into their local variables shows a coercion dot. Is this just to remind me that I'm using a custom control? I though a Boolean was a Boolean was a Boolean was a...




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 1 of 5
(3,318 Views)
The coercian dot does not normally appear if you have just edited the control, however it will show up if the control has been saved as a typedef...(?).
Message 2 of 5
(3,318 Views)
Bingo! I disconnected the Booleans from their respective typedefs, and voila! No more coercion!

ta 🙂




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 3 of 5
(3,318 Views)
This feature first appeared in 6.1.

If you show the help and select the wiring tool you will see the wire is assosiated with the type def.

If you click on the wire and do a create constant, you will see the constant is associated with the type def.

I like this feature.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(3,318 Views)
I can understand it for other datatypes, but why the Boolean? I suppose it's easier to treat all types the same - but a coercion dot? I can't see how the *data* is coerced.




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 5 of 5
(3,318 Views)