here it is converted into wolfram: 
vbDist[iSource_, iDest_] :=
 Module[{x1, y1, x2, y2, HEXMOD, dx, dy, getdist},
  HEXMOD = 100;
  x1 = IntegerPart[ iSource/ HEXMOD ];
  y1 = Mod[ iSource , HEXMOD ];
  x2 = IntegerPart[ iDest / HEXMOD ];
  y2 =  Mod[iDest, HEXMOD] ;
  dx = Abs[ x2 - x1];
  dy = y2 - y1 + IntegerPart[dx/2];
  dy = If[ Mod[x1, 2] == 1 && Mod[x2, 2] == 0, dy + 1, dy];
  getdist = dx - dy;
  getdist = If[ dy > getdist, dy, getdist];
  getdist = If[dx > getdist, dx, getdist];
  getdist
  ]

In[1950]:= vbDist[ 0101,0810]
Out[1950]= 13

Unfortunately, it cannot be simplified to a single equation (which I think was the original question?) 



On Tue, Mar 31, 2020 at 3:18 AM Edward Anderson <xxxxxx@hotmail.com> wrote:
Howdy,

I wrote the VB6 program, and haven’t messed with it in a long while, but here is the source code for getting the distance between two hexes. You’d pass the source and destination hexes, and it would return the distance between the two.

=====

Function get_dist(ByVal iSource As Long, ByVal iDest As Long) As Long
  Dim x1 As Long, x2 As Long, y1 As Long, y2 As Long, dx As Long, dy As Long
  
  ' 1st hex x and y axis
  x1 = Int(iSource / HEXMOD) 'hex mod is a constant, 100 for 4-digit hexes, 1000 for 6-digit
  y1 = iSource Mod HEXMOD
  
  ' second hex x and y axis
  x2 = Int(iDest / HEXMOD)
  y2 = iDest Mod HEXMOD

  'distance between x's and y's
  dx = Abs(x2 - x1)
  dy = y2 - y1 + Int(dx / 2)
  
  ' adjust for even/odd hex locations
  If (x1 Mod 2 = 1) And (x2 Mod 2 = 0) Then dy = dy + 1
  
  ' return the largest of these 3 items: dx, dy, or dx - dy
  ' VB6 uses the function name to return a value to the calling function
  get_dist = dx - dy
  If dy > get_dist Then get_dist = dy
  If dx > get_dist Then get_dist = dx
End Function

=====


Hope this helps.

Ed “Dalthor Et Magera” Anderson


On Mar 30, 2020, at 10:49 PM, Kurt Feltenberger <xxxxxx@thepaw.org> wrote:

IIRC, VB6 could be made to work with Win7, but that was the end point of any compatibility.  We had a database that required it and Access, and were limited to XP for easy operation, and had to do a bit of tweaking for 7 to work.  After all, the last stable release was from 1998...

Kurt Feltenberger



On Mon, Mar 30, 2020 at 6:13 PM -0400, "Jeff Zeitlin" <xxxxxx@freelancetraveller.com> wrote:

On Sun, 29 Mar 2020 14:20:29 -0700 (PDT), Thomas RUX 
wrote to Freelance Traveller:

>Hello Jeff,
>
>Here is a link to a jump route calculator over on the Citizen of the Imperium forum.
>
>http://www.travellerrpg.com/CotI/Discuss/showthread.php?t=33538

Which I have, which I can't get working on Windows 10 (I suspect I'm
missing something in the VB6RT, or else Panda or Windows Defender doesn't
like it - although I had no trouble getting it running on my legacy Win7
box), and which, in any case, doesn't come with source, and I actually had
the idea of doing some own-coding covering the subject for Traveller by the
Byte. But thank you for the pointer.



®Traveller is a registered trademark of
Far Future Enterprises, 1977-2020. Use of
the trademark in this notice and in the
referenced materials is not intended to
infringe or devalue the trademark.

-- 
Jeff Zeitlin, Editor
Freelance Traveller
    The Electronic Fan-Supported Traveller® Resource
xxxxxx@freelancetraveller.com
http://www.freelancetraveller.com

Freelance Traveller extends its thanks to the following
enterprises for hosting services:

onCloud/CyberWeb Enterprises (http://www.oncloud.io)
The Traveller Downport (http://www.downport.com)
-----
The Traveller Mailing List
Archives at http://archives.simplelists.com/tml
Report problems to xxxxxx@simplelists.com
To unsubscribe from this list please go to 
http://archives.simplelists.com

-----
The Traveller Mailing List
Archives at http://archives.simplelists.com/tml
Report problems to xxxxxx@simplelists.com
To unsubscribe from this list please go to
http://archives.simplelists.com


-----
The Traveller Mailing List
Archives at http://archives.simplelists.com/tml
Report problems to xxxxxx@simplelists.com
To unsubscribe from this list please go to
http://www.simplelists.com/confirm.php?u=wkJZDVdDoS21PvuTrsXSMsmho7pwDsoN