In article <90ttii$q6g$1 / uwm.edu>, Thelma Lubkin 
<thelma / alpha2.csd.uwm.edu> wrote:

> In comp.lang.perl.misc Dave Cross <dave / dave.org.uk> wrote:
> : The length of a string and the number of elemetns in an array really
> : aren't the same thing at all, so it makes sense to me that I find them
> : in different ways. The same goes for substrings and array slices.
> 
> : Thinking of these concepts as similar seems to meto be a hangover from
> : C, where strings are arrays of characters, but surely we've moved on
> : since then.
> 
> : Maybe your boss is a C programmer?
> 
>           if aray[8] can hold 8 5-character strings (ie aray's
>           elements are char*5), a C programmer would say it's a length
>           8 array, not a length 40 array.

it depends on what you mean by length.  C programmers typically think
about the actual number of bytes they use, so length could mean a
couple of different things depending on the context.

but that's not what Dave was talking about.  in Perl, a string is
not a sequence like it can be in some other languages. it is just
a scalar.

 
>           Why the gratuitous insult to C programmers?

i don't see how "gratuitous" or "insult" have anything to do with 
it.

>                            --thelma
>                     who struggles along in both languages.

which is perhaps why you missed the point.

-- 
brian d foy
Perl Mongers <URL:http://www.perl.org>
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>