TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: William McBrine
from: Neil Heller
date: 2003-03-24 13:53:00
subject: Re: switch statement

NH> What's the necessity of this base?  [base-36, that is]

WM> It's (relatively) efficient -- it uses the minimum number of digits
WM> to cover the maximum range of values, assuming that you're limited
WM> to 1-9 and A-Z as digits. (In OPX, for example, a three-letter
WM> extension in base 36 covers areas 0 through 46655.)

Now that I stop to think for a minute I can realize that if only decimal 
numerics and alphas are being converted, a table-driven application 
would probably be the fastest way to convert ASCII to EBCIDIC.  This 
must be another one of those times when I should hit my forehead with 
the heal of my palm.

WM>  NH> Base 32, however, can be used as:
WM>  ...
WM>  NH>  sprintf(TargetStr, "0x%x", Source);

WM> Um, that's base 16.

Blush... you're right.

þ CMPQwk 1.42 999

--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

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™.