logo WinWrap®
September 19, 2016

Binary Literals

WinWrap® Basic now supports using underscores for visual separation in script 'num definitions'. Use these placeholder underscores to improve readability and understanding of number definitions.

  • Use one or more '_' characters as insignificant placeholders between two digits
  • This is especially useful in binary literals where the bits have grouped meaning
  • This can also be used with decimal and other number definitions

For example, you can specify bit patterns directly instead of having to use hexadecimal notation.

Binary Literals

Documentation for the use of insignificant placeholders in WWB numbers can be found at num definition.

Microsoft Visual Basic 15

Binary literals is one of the new features upcoming in Visual Basic 15.

For example:

Enum MouseEventFlags MOUSEEVENTF_ABSOLUTE = &B0000_1_0000_000000_0 MOUSEEVENTF_LEFTDOWN = &B0000_0_0000_000001_0 MOUSEEVENTF_LEFTUP = &B0000_0_0000_000010_0 MOUSEEVENTF_RIGHTDOWN = &B0000_0_0000_000100_0 MOUSEEVENTF_RIGHTUP = &B0000_0_0000_001000_0 MOUSEEVENTF_MIDDLEDOWN = &B0000_0_0000_010000_0 MOUSEEVENTF_MIDDLEUP = &B0000_0_0000_100000_0 End Enum

See blogs.msdn.microsoft.com/dotnet/2016/07/13/visual-studio-15-preview-3-for-c-and-visual-basic/ for more information from Microsoft.

Copyright Polar Engineering, Inc.