13 people like it.

Example of annoying enumeration syntax

Example of annoying enumeration syntax

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
33: 
34: 
35: 
36: 
37: 
38: 
39: 
40: 
41: 
42: 
43: 
44: 
45: 
46: 
47: 
48: 
49: 
50: 
  //----------------------------------------------------------------------------
  type Punctuation
    = LeftBrace = 0
    | RightBrace = 1
    | LeftParenthesis = 2
    | RightParenthesis = 3
    | LeftBracket = 4
    | RightBracket = 5
    | Semicolon = 6
    | Comma = 7
    | Equal = 8
    | NotEqual = 9
    | StrictEqual = 10
    | StrictNotEqual = 11
    | LessThan = 12
    | GreaterThan = 13
    | LessThanOrEqual = 14
    | GreaterThanOrEqual = 15
    | Plus = 16
    | Minus = 17
    | Multiply = 18
    | Divide = 19
    | Modulo = 20
    | Increment = 21
    | Decrement = 22
    | LeftShift = 23
    | RightShift = 24
    | URightShift = 25
    | BitwiseAnd = 26
    | BitwiseOr = 27
    | BitwiseXor = 28
    | BitwiseNot = 29
    | LogicalNot = 30
    | LogicalAnd = 31
    | LogicalOr = 32
    | Conditional = 33
    | Colon = 34
    | Assign = 35
    | AssignAdd = 36
    | AssignSubtract = 37
    | AssignMultiply = 38
    | AssignDivide = 39
    | AssignModulo = 40
    | AssignLeftShift = 41
    | AssignSignedRightShift = 42
    | AssignUnsignedRightShift = 43
    | AssignBitwiseAnd = 44
    | AssignBitwiseOr = 45
    | AssignBitwiseXor = 46
    | Dot = 47
Punctuation.LeftBrace: Punctuation = 0
Punctuation.RightBrace: Punctuation = 1
Punctuation.LeftParenthesis: Punctuation = 2
Punctuation.RightParenthesis: Punctuation = 3
Punctuation.LeftBracket: Punctuation = 4
Punctuation.RightBracket: Punctuation = 5
Punctuation.Semicolon: Punctuation = 6
Punctuation.Comma: Punctuation = 7
Punctuation.Equal: Punctuation = 8
Punctuation.NotEqual: Punctuation = 9
Punctuation.StrictEqual: Punctuation = 10
Punctuation.StrictNotEqual: Punctuation = 11
Punctuation.LessThan: Punctuation = 12
Punctuation.GreaterThan: Punctuation = 13
Punctuation.LessThanOrEqual: Punctuation = 14
Punctuation.GreaterThanOrEqual: Punctuation = 15
Punctuation.Plus: Punctuation = 16
Punctuation.Minus: Punctuation = 17
Punctuation.Multiply: Punctuation = 18
Punctuation.Divide: Punctuation = 19
Punctuation.Modulo: Punctuation = 20
Punctuation.Increment: Punctuation = 21
Punctuation.Decrement: Punctuation = 22
Punctuation.LeftShift: Punctuation = 23
Punctuation.RightShift: Punctuation = 24
Punctuation.URightShift: Punctuation = 25
Punctuation.BitwiseAnd: Punctuation = 26
Punctuation.BitwiseOr: Punctuation = 27
Punctuation.BitwiseXor: Punctuation = 28
Punctuation.BitwiseNot: Punctuation = 29
Punctuation.LogicalNot: Punctuation = 30
Punctuation.LogicalAnd: Punctuation = 31
Punctuation.LogicalOr: Punctuation = 32
Punctuation.Conditional: Punctuation = 33
Punctuation.Colon: Punctuation = 34
Punctuation.Assign: Punctuation = 35
Punctuation.AssignAdd: Punctuation = 36
Punctuation.AssignSubtract: Punctuation = 37
Punctuation.AssignMultiply: Punctuation = 38
Punctuation.AssignDivide: Punctuation = 39
Punctuation.AssignModulo: Punctuation = 40
Punctuation.AssignLeftShift: Punctuation = 41
Punctuation.AssignSignedRightShift: Punctuation = 42
Punctuation.AssignUnsignedRightShift: Punctuation = 43
Punctuation.AssignBitwiseAnd: Punctuation = 44
Punctuation.AssignBitwiseOr: Punctuation = 45
Punctuation.AssignBitwiseXor: Punctuation = 46
Punctuation.Dot: Punctuation = 47
Raw view Test code New version

More information

Link:http://fssnip.net/2m
Posted:13 years ago
Author:fholm
Tags: enumeration