Got something to write about? Check out our Article Builder.
*/
*/

ANY2DEC

*/

ANY2DEC

Submitted By: WEBMASTER
Rating: starstar (Rate It)

Converts a number in string form, in any base (2-35), into an
unsigned integer. No checking for validity is done-- characters
are assumed to be within the proper range for the base chosen,
and the number as a whole is assumed to be within unsigned
integer range. C source


NOTE: Some downloads must be obtained through publishers´s site.
Do you want to get your software listed on this site? Go to our submissions area.

Screenshot

No Image

Details

File Name:
ADVC11.ZIP
Product homepage:
Order page:
Languages:
C
Platforms:
Unknown
Release date:
1/1/1990
License:
Unknown
Size:
9 KB
Price/Fee (US$):
Unknown
Number of downloads:
5838

Comments (2)

Works well - needs 1 modification starstarstarstar   Posted by: Bock Fu on Tuesday, September 11, 2001

Works well but the user may want to change the following line from:

else if (islower(digit)) digit = *str - 'a' + 10;

to:

else if (islower(*str)) digit = *str - 'a' + 10;

Otherwise the program will get an access violation when digit is not initialized and the islower(digit) call is made. Also, who cares what digit is, we want to know about the character in *str ;)
-BockFuStein

very poor   Posted by: Paulista on Wednesday, July 30, 2003

Very very poor code. This is not hash. This don't verify any error.

Add Your Rating

(Not published)
star
starstar
starstarstar
starstarstarstar
starstarstarstarstar

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings