While I am working with the Evaluation Kit (contains an old Version of C51), I used "strlen()" within a function, where the string in referenced using a pointer. The result is always 2 or 3; which is the size of the pointer variable. Now I guess, "strlen()" simple consist of a "sizeof()" sourcecode. Example: // String + size char stringbuffer[] = "Hello\0"; int string_length1; // Correct Value string_length1 = strlen( stringbuffer ); // Function Call wrong_function( stringbuffer ); // Function wrong_function( char* stringpointer ) { int length_string2; // wrong value length_string2 = strlen( stringpointer ); }
8 years withou an answer ??? crazy no ???
Why did you feel a need to wake up an 8 year old thread that was forgotten within just a few days when it moved off from the first page of threads? You think anyone was sitting there waiting for the answer?
Oops - maybe you thought that the forum readers really didn't had the knowledge to be able to answer the question? Didn't you even consider the possibility that the poster may have started multiple threads, and received an answer in another thread? It is a common fact, if you look around on the net, that people now and then asks questions without getting any answer. Even if there are lots of people who do know the answer.
The forum "timeout" is broken - so let's go and wake-up all the old, dead threads:
http://www.keil.com/forum/1
http://www.keil.com/forum/6/