Learning BSV‎ > ‎Data Types‎ > ‎

User Defined Types

  • Enum : Similar to most languages, you can define names to be used in your code.  Enum labels must all start with an uppercase letter.
  • Struct: Structures contain members.  A struct value contains the first member and the second member and the third member, and so on.  Structure member names begin with a lowercase letter.
  • Tagged Union: Tagged unions also contain members.  A tagged union value contains the first member or the second member or the third member, and so on.  Tagged union member names begin with a lowercase letter.

Defining Types

typedef  is used to define a type synonym and the user defined types Enum, Struct, and Tagged Union.
Comments