Jump to content

Enumerated type

From LabVIEW Wiki
Revision as of 02:50, 12 May 2007 by Chrisdavis (talk | contribs) (New page: == Enumerated Type (Enum) == Located under the Ring & Enum palette, a LabView enumerated type is used to associate a '''sequencial''' numerical value to a programmer defined string constan...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Enumerated Type (Enum)

Located under the Ring & Enum palette, a LabView enumerated type is used to associate a sequencial numerical value to a programmer defined string constant.

Potential Uses

Enum's can be used with a case selector to provide the programmer an easy way to select a case based on a constant name instead of a number or a string.
Typedef'd Enum's are often used in State Machines to provide the programmer an easy way to select new cases without having to worry about spelling mistakes.

Shortcomings

LabView enumerated types do not allow for non-sequential values, or what might be known as sparse enum's.