TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Neil Heller
from: Jasen Betts
date: 2003-03-23 09:16:56
subject: switch statement

Hi Neil.

22-Mar-03 11:17:00, Neil Heller wrote to Jonathan de Boyne Pollar


 NH>> atoi() IS standard and is included in stdlib. atoi   is NOT
 NH>> standard and could be anything. atoi() is equivalent to:
 NH>> (int)strtol(s, (char ***)NULL, 10) atoi() can easily be replaced
 NH>> by the usage of sprintf() [...]

 Jd>> 2s/atoi/itoa/ 4s/atoi/itoa/

 Jd>> The statement in line 3 is not completely true (Consider what is
 Jd>> defined to happen to "errno".).  The statement in
(the corrected)
 Jd>> line 4 is not completely true (Consider the use of itoa() to
 Jd>> generate base 36 strings.).

 NH> Base 36?  I've never seen or heard of base 36 being used outside
 NH> of an academic exercise.  Have you?  What's the necessity of this
 NH> base?

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

base 32?

 -=> Bye <=-

---
* Origin: I smell a rat. Did you bake it or fry it? (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 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™.