At 1:08 PM -0700 5/26/02, Joe wrote:
>--- Keith Rollin <[EMAIL PROTECTED]> wrote:
>>
>>  But Joe *was* off-base in part of his response.
>>
>
>Now you've made me go back and read what I wrote!  I don't see 
>anything wrong except for a little sloppiness in the 2nd post when 
>describing the relative equivalency of pointers and arrays, and a 
>bit of snippiness in the 1st post (which I attribute to the late 
>hour).

Sorry...these are difficult waters to navigate.  :-)  It's sometimes 
difficult to express just the right level of "transgression". :-) 
"Off base" was meant to mean "just a little wrong", not "blatantly 
wrong get the hell off of my mailing list and never post here again".

I think that the questionable parts of what you said would be the 
parts John pointed out.  strlen can be used just fine on the Palm 
(with development environment support, or with one's own macros), and 
there's little wrong with using "char*" instead of "Char*".

Let's also take a look at the following that you posted:

>   // locate a space
>   p = StrChr(sentence, ' ');
>
>   if (p)
>     // found a space, so copy the word
>     StrNCopy(word, sentence, (p - sentence));

This is questionable, not only because StrNCopy's definition has 
changed in practically every release of the OS, but because even when 
using the standard definition of strncpy, you'll have a termination 
problem.  You are guaranteeing that the result will not be properly 
terminated with a NUL.

I'm guessing that you probably typed that code into your e-mail 
program and didn't try it out before posting (as I also did in my 
response to bill's question), but neither did you add a disclaimer 
(as I did -- instead you said "That's the end of today's lesson on 
the C programming language", which applied a rather expert tone to 
your code sample).

>BTW, I make no claim to being an expert.  I don't even claim to know 
>C -- it's just one of the many languages I've used with some 
>success.  One of the best features of this forum is that I know that 
>if I say something wrong, I'll be quickly corrected.
>
>- Joe "Would anyone feel better if I added a surname?"

Adding a surname would give people a better handle on who you are. I, 
for one (and I'm definitely speaking personally here), feel that 
people who use just first names are trying to hide a bit.  While I 
may sign just "Keith" at the bottom of my e-mails, I definitely keep 
the full thing up in the From: header field.

-- Keith

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to