Binary Literals ("M" Reference)

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

Binary literals are used to write binary values. The type of a binary literal defaults to Binary.

Literal Format

Binary literals take the following format.

BinaryLiteral:
0x  HexDigitsopt
0X  HexDigitsopt

HexDigit: one of
0  1  2  3  4  5  6  7  8  9  0  a  b  c  d  e  f  A  B  C  D  E  F
HexDigits:
HexDigit
HexDigits  HexDigit

Binary literals must have exactly 2 digits after the 0x or 0x. For example, 0x01 is legal, while 0x1 and 0x017 are both illegal.

See Also

Other Resources

"M" Literals ("M" Reference)