bitwise Module

To apply bitwise (and) and (or) to integer which represents the binary or oct number


Used by

  • module~~bitwise~~UsedByGraph module~bitwise bitwise module~wall wall module~wall->module~bitwise module~solver solver module~solver->module~wall module~create_and_erase create_and_erase module~create_and_erase->module~wall program~main main program~main->module~solver module~start_finish start_finish program~main->module~start_finish module~start_finish->module~solver

Contents


Interfaces

public interface operator(.and.)

  • public function int4_and_int4(a, b) result(r)

    Bitwise 'AND' over two integer of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(in) :: a
    integer(kind=4), intent(in) :: b

    Return Value integer(kind=4)

  • public function int8_and_int8(a, b) result(r)

    Bitwise 'AND' over two integer of kind 8

    Arguments

    Type IntentOptional AttributesName
    integer(kind=8), intent(in) :: a
    integer(kind=8), intent(in) :: b

    Return Value integer(kind=8)

public interface operator(.or.)

  • public function int4_or_int4(a, b) result(r)

    Bitwise 'OR' over two integer of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(in) :: a
    integer(kind=4), intent(in) :: b

    Return Value integer(kind=4)

  • public function int4_1D_or_int4_1D(a, b) result(r)

    Bitwise 'OR' over two 1D integer array of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(in), dimension(:):: a
    integer(kind=4), intent(in), dimension(:):: b

    Return Value integer(kind=4), dimension(size(a))

  • public function int4_1D_or_int4(a, b) result(r)

    Bitwise 'OR' over one 1D integer array and integer of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(in), dimension(:):: a
    integer(kind=4), intent(in) :: b

    Return Value integer(kind=4), dimension(size(a))

  • public function int4_2D_or_int4_2D(a, b) result(r)

    Bitwise 'OR' over two 2D integer array of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(in), dimension(:, :):: a
    integer(kind=4), intent(in), dimension(:, :):: b

    Return Value integer(kind=4), dimension(:, :), allocatable

  • public function int4_2D_or_int4(a, b) result(r)

    Bitwise 'OR' over one 2D integer array and integer of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(in), dimension(:, :):: a
    integer(kind=4), intent(in) :: b

    Return Value integer(kind=4), dimension(:, :), allocatable

  • public function int8_or_int8(a, b) result(r)

    Bitwise 'OR' over two integer of kind 8

    Arguments

    Type IntentOptional AttributesName
    integer(kind=8), intent(in) :: a
    integer(kind=8), intent(in) :: b

    Return Value integer(kind=8)

public interface assignment(=)

  • public subroutine int4_from_string(lhs, rhs)

    Get integer of kind 4 from the string which might contain either octal or binary number

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(out) :: lhs
    character(len=*), intent(in) :: rhs
  • public subroutine int8_from_string(lhs, rhs)

    Get integer of kind 8 from the string which might contain either octal or binary number

    Arguments

    Type IntentOptional AttributesName
    integer(kind=8), intent(out) :: lhs
    character(len=*), intent(in) :: rhs

public interface bin2int

  • public subroutine bin_to_int4(r, binstr)

    String of binary number converted to integer of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(out) :: r
    character(len=*) :: binstr
  • public subroutine bin_to_int8(r, binstr)

    String of binary number converted to integer of kind 8

    Arguments

    Type IntentOptional AttributesName
    integer(kind=8), intent(out) :: r
    character(len=*) :: binstr

public interface oct2int

  • public subroutine oct_to_int4(r, octstr)

    String of octal number converted to integer of kind 4

    Arguments

    Type IntentOptional AttributesName
    integer(kind=4), intent(out) :: r
    character(len=*) :: octstr
  • public subroutine oct_to_int8(r, octstr)

    String of octal number converted to integer of kind 8

    Arguments

    Type IntentOptional AttributesName
    integer(kind=8), intent(out) :: r
    character(len=*) :: octstr

Functions

public function int4_and_int4(a, b) result(r)

Bitwise 'AND' over two integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in) :: a
integer(kind=4), intent(in) :: b

Return Value integer(kind=4)

public function int8_and_int8(a, b) result(r)

Bitwise 'AND' over two integer of kind 8

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(in) :: a
integer(kind=8), intent(in) :: b

Return Value integer(kind=8)

public function int4_or_int4(a, b) result(r)

Bitwise 'OR' over two integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in) :: a
integer(kind=4), intent(in) :: b

Return Value integer(kind=4)

public function int4_1D_or_int4_1D(a, b) result(r)

Bitwise 'OR' over two 1D integer array of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in), dimension(:):: a
integer(kind=4), intent(in), dimension(:):: b

Return Value integer(kind=4), dimension(size(a))

public function int4_1D_or_int4(a, b) result(r)

Bitwise 'OR' over one 1D integer array and integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in), dimension(:):: a
integer(kind=4), intent(in) :: b

Return Value integer(kind=4), dimension(size(a))

public function int4_2D_or_int4_2D(a, b) result(r)

Bitwise 'OR' over two 2D integer array of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in), dimension(:, :):: a
integer(kind=4), intent(in), dimension(:, :):: b

Return Value integer(kind=4), dimension(:, :), allocatable

public function int4_2D_or_int4(a, b) result(r)

Bitwise 'OR' over one 2D integer array and integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(in), dimension(:, :):: a
integer(kind=4), intent(in) :: b

Return Value integer(kind=4), dimension(:, :), allocatable

public function int8_or_int8(a, b) result(r)

Bitwise 'OR' over two integer of kind 8

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(in) :: a
integer(kind=8), intent(in) :: b

Return Value integer(kind=8)


Subroutines

public subroutine bin_to_int4(r, binstr)

String of binary number converted to integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(out) :: r
character(len=*) :: binstr

public subroutine bin_to_int8(r, binstr)

String of binary number converted to integer of kind 8

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(out) :: r
character(len=*) :: binstr

public subroutine oct_to_int4(r, octstr)

String of octal number converted to integer of kind 4

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(out) :: r
character(len=*) :: octstr

public subroutine oct_to_int8(r, octstr)

String of octal number converted to integer of kind 8

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(out) :: r
character(len=*) :: octstr

public subroutine int4_from_string(lhs, rhs)

Get integer of kind 4 from the string which might contain either octal or binary number

Arguments

Type IntentOptional AttributesName
integer(kind=4), intent(out) :: lhs
character(len=*), intent(in) :: rhs

public subroutine int8_from_string(lhs, rhs)

Get integer of kind 8 from the string which might contain either octal or binary number

Arguments

Type IntentOptional AttributesName
integer(kind=8), intent(out) :: lhs
character(len=*), intent(in) :: rhs