03-19-2010 01:25 PM
Greetings,
Is there a way to extract the size (dimansion) of an enum (enumeration)? Looking for number of entries in the enum.
Also, can the label within an enum individual record also be extracted as a character string?
Thanks
03-19-2010 05:22 PM
Yes. You can take the first element in the enumeration, subtract 1, and you'll get the maximum value of the enumeration. Convert that to an integer and add one, and you have the number of items in the enumeration. You can convert an individual enumeration element to a string by using "Format Into String" with the format string set to %s.
Is this question related to code for the FIRST Robotics Competition? If not, please post future questions in the appropriate forum at http://forums.ni.com.
03-19-2010 06:37 PM
Thanks, this is for LabView FRC. I want to use this with some other code prior to the Autonomous period when we can send some IO to the robot. By the way, What is the order of execution when connected to the field. In 2009 it was: BEGIN--TELEOP--AUTON--TELEOP. SO we put similar code in teleop so that we could send data to the auton just prior to the match starting.
Thanks Again