User Tools

Site Tools


Sidebar

dictionary:bitwise:bitwiseor

Bitwise Or

Takes an AppleScript list containing 2 values. The values can be numbers, or they can be strings with identifiers telling XTension what kind of values they are. The return is the result of performing a bitwise OR on the 2 values.

Usage:

bitwiseor (list: 2 values either numbers or text with number format specifiers, see below)
returns number

Number Specifiers

By using these prefixes to the number string this command can work with decimal numbers, binary numbers, hexadecimal numbers even octal numbers.

  • “&h” to denote the following number is hex, like “&hAABBCC22“
  • “&b” to denote the following number is a binary string, like “&b11010011”
  • “&o” to denote the following number is an octal string, like “&o4522“
  • for decimal numbers no prefix is necessary, like “23”

Examples:

  set myOrValue to (bitwiseOr {55, 95})
  
  set myOrValue to (bitwiseOr {32, “&h22”})
  
  set myOrValue to (bitwiseOr {“&b1101011”, “&o23”})
dictionary/bitwise/bitwiseor.txt · Last modified: 2017/03/06 18:31 (external edit)