03-31-2004 02:18 AM
03-31-2004 08:56 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-31-2004 10:35 AM
LabVIEW, C'est LabVIEW
04-24-2007 01:59 PM
06-12-2008 04:12 PM
06-13-2008 01:36 AM
Derek.Mayer wrote:
Is there a way to statically create an enum with non-contiguous values?
06-13-2008 02:08 AM
06-13-2008 04:02 AM
LabVIEW enums are always consecutive. If you want sparse enums you have to use the ring control instead where you can assign names to each value but those names are not part of the LabVIEW datatype.
@Derek.Mayer wrote:
It looks like you were able to create the enum programmatically. I don't have C code, so I wasn't able to use your example.
Is there a way to statically create an enum with non-contiguous values?
02-26-2013 07:46 AM
I add the c enum to Labview enum from the link. I updated it to 2012 and added name of the enum.
Julien
08-28-2013 03:35 AM
I have been developing a slightly more elaborate one, though no way universal, as only the C compiler would be.
My one can scan .h files for either
#define PREFIX_SOMETHING value /* comments */
or
PREFIX_SOMETHING = value /* comments */
where value is an integer in either decimal or hex notation, duplicate values are discarded, and definitions can be filtered by PREFIX.
The results are used to populate a ring control, which may eventually be copied to a typedef for perusal.
Enrico