dim TEMP_DWORD as DWORD
dim LONG_DIGRAPH as DWORD
dim EASTING as FLOAT
.
.
more declarations and more code
.
.
'EXTRACT THE LONGITUDINAL DIGRAPH FOR MGRS
TEMP_DWORD = LONG_ZONE - 1 'subtract one from the long zone variable and store in dword long_digraph
TEMP_DWORD = (TEMP_DWORD // 3)
TEMP_DWORD = TEMP_DWORD * 8 'take the 3 modulus of this, multiply by 8
LONG_DIGRAPH = EASTING / 100000
LONG_DIGRAPH = LONG_DIGRAPH + TEMP_DWORD 'divide easting by 100,000 and then add value in temp_dword