TIP: Click on subject to list as thread! ANSI
echo: cellular
to: BILL SHRYOCK
from: SCOTT CURRIER
date: 1997-06-27 11:34:00
subject: ESN Number conversion

-BS> I am in need of a QuickBASIC routine to convert ESN numbers
-BS> from base 10 to
-BS> base 16 and back.  This is not a stright 10 to 16
-BS> conversion, there is a
-BS> procedure for doing it.  I can do it from base 16 to base
-BS> 10 with the
-BS> calculator in windows but I can't convert it back.  I
It's real easy. When going from hex to decimal, convert the prefix first, the 
prefix is the first two digits. For Mitsubishi it's 86 which converts to 134 
in decimal. Then take the remaining 6 digits and convert them to decimal, put 
the prefix on the front and the remaining 8 decimal digits on the back and 
you're all set.
To go from Decimal to hex, convert the first three digits to hex, then the 
remaining 8 digits to hex.
There are cases where an esn will come out with one less digit, when that 
happens you need to put in a zero after the prefix so that the esn converts 
from 8 to 11 digits or 11 back to 8.
Should be fairly easy to program up in quick basic.
---
---------------
* Origin: Computer Castle / 20 Lines / Newton, NH / 603-382-0338 (1:324/127)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.