[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] That was productive...



In article <F163F8A5E28DD2118B1E0000E85170A73AC292@exchange.datenrevision.de>,
Philip Newton <philip.newton@datenrevision.de> wrote:
>
>This might be different if you're coming from C and used to using sizeof()
>or strlen()... then you're working with sizes. But then C has no way of
>telling you the index of the last element of an array.

Everywhere I've done C programming, there has been a macro like this:

#define countof(x) (sizeof(x)/sizeof(x[0]))

in an ubiquitously used include file.

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe