Re: [CODE] More About Arguments

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 10/05/97


On Fri, 3 Oct 1997, Brian Williams - Nashak wrote:

>If I'm not mistaken, atoi just returns 0 always. Like atoi("Nashak") = 0,
>it just changes it to an integer.

Except atoi("12345") returns 12345, which looks like his intention.

>> argu = atoi(buf); /* i need an integer to work worth */
>>
>> sprintf(buf, "Argument: %d\r\n", argu);

If your function doesn't take numbers, don't use atoi().

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST