Enums

This allows the creation of user-defined types. An example is shown as follows:

enum Order {Filled, Placed, Expired };  
Order private ord; 
ord=Order.Filled; 

Explicit conversion to and from all integer types is allowed with enums.

Get Mastering Blockchain - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.