Skip to content

Commit

Permalink
Update Description.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
RZulu54 committed Mar 6, 2024
1 parent 4c23c02 commit 120cc40
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions VBA7_64BitOperations/Description.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
List of functions in module 'bas64BitOperations'

Emulate ULongLong 64 bit unsigned integer operations
====================================================

The problem with VBA/VB6 is that there are no 64-bit unsigned integers (ULongLong) available.

The module 'bas64BitOperations.bas' contains functions to emulate bit operations for 64-bit unsigned integers.

For 32-bit MsOffice VBA or VB6 we can use two Long 32-bit signed integers combined in a new datatype TBit64.

this requires functions for basic bit operations like AND, OR, XOR, NOT.

For 64-bit MsOffice VBA7 we can use the new 64-bit signed integer datatype LongLong.

basic bit operations like AND, OR, XOR, NOT do NOT need extra functions but can be used directly.

Functions available for both variants are:

SetBit64, ClearBit64, ShiftLeft64, ShiftRight64, PopCnt64 (number of bits set),

Lsb64 (position of left most bit), Rsb64 (position of left most bit) and some more.

The Ms-Excel file VBA7.xlsm shows how to use these functions for 32/64-bit MsOffice.

For 64-bit Excel there is also a simple chess demonstration how to use 64-bit chessboard logic.

(for the best Excel/VB6 chess program available please see my project at github.com/RZulu54/ChessBrainVB)

----------------------------------------------------------------------------------------------

List of functions in module 'bas64BitOperations'
================================================

call Init32Bit before call Init64Bit before
32-bit mode 64-bit mode Some logic needed to handle the sign bit
Expand Down

0 comments on commit 120cc40

Please sign in to comment.