Re: Question About Z-Level Number Thingie
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET> Dec 07, 1999
- 454 views
Big number arithmetic is already available in the Euphoria Archives. It does just what you are purposing. Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+ > ---------------------- Information from the mail header ----------------------- > Sender: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU> > Poster: "C. K. Lester" <cklester at TICNET.COM> > Subject: Question About Z-Level Number Thingie > -------------------------------------------------------------------------- ----- > > Howdy, guys 'n' gals, > > I was wondering if somebody could point me in the right direction... > > I want to be able to use what I am temporarily calling "Z-Level" numbering, > where it's like hexadecimal but it uses the whole alphabet (up to 'Z', you > see). Whereas hexadecimal stops at F=15, z-decimal stops at Z = 36 (starting > with 0=0 and workin' yer way up). > > I would like to have a generic routine where you can plug in a value and > tell it what numbering scheme you want to use (anything from 1 (binary) to > 36 (z-level) initially) and it > will return that numbering scheme's number. > > For example, > > rVal = number(15, 16) would set rVal to the hexadecimal equivalent of "F", > because I want '15' returned in base-16. > > Or, we could have a separate function for each number base. For instance: > > rVal = hex(15) would set rVal to "F". > rVal = zex(36) would set rVal to "Z". > rVal = zex(37) would set rVal to "10". (Right?) > > Anyway, if anybody could provide some hints and tips in this direction, I'd > appreciate it! > > TIA, > < |< >