Operator: |

operator | { associativity left precedence }

Declarations

func |(_: Int, rhs: Int)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: Int, rhs: Int) -> Int

Declared In

Int, FixedWidthInteger
func |(_: Int8, rhs: Int8)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: Int8, rhs: Int8) -> Int8

Declared In

Int8, FixedWidthInteger
func |(_: Int16, rhs: Int16)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: Int16, rhs: Int16) -> Int16

Declared In

Int16, FixedWidthInteger
func |(_: Int32, rhs: Int32)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: Int32, rhs: Int32) -> Int32

Declared In

Int32, FixedWidthInteger
func |(_: Int64, rhs: Int64)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: Int64, rhs: Int64) -> Int64

Declared In

Int64, FixedWidthInteger
func |(_: UInt, rhs: UInt)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: UInt, rhs: UInt) -> UInt

Declared In

UInt, FixedWidthInteger
func |(_: UInt8, rhs: UInt8)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: UInt8, rhs: UInt8) -> UInt8

Declared In

UInt8, FixedWidthInteger
func |(_: UInt16, rhs: UInt16)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: UInt16, rhs: UInt16) -> UInt16

Declared In

UInt16, FixedWidthInteger
func |(_: UInt32, rhs: UInt32)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: UInt32, rhs: UInt32) -> UInt32

Declared In

UInt32, FixedWidthInteger
func |(_: UInt64, rhs: UInt64)

Returns the result of performing a bitwise OR operation on the two given values.

A bitwise OR operation results in a value that has each bit set to 1 where one or both of its arguments have that bit set to 1. For example:

let x: UInt8 = 5          // 0b00000101
let y: UInt8 = 14         // 0b00001110
let z = x | y             // 0b00001111
// z == 15

Parameters: lhs: An integer value. rhs: Another integer value.

Declaration

func |(lhs: UInt64, rhs: UInt64) -> UInt64

Declared In

UInt64, FixedWidthInteger