[rescue] Cooling (Long Message, sorry)

dave at cca.org dave at cca.org
Thu Apr 18 19:19:34 CDT 2002


jdboyd at cs.millersville.edu writes:

>On Thu, Apr 18, 2002 at 03:09:17PM -0700, David Passmore wrote:
>> I don't use arrays at all. Well, I should say that I don't use array
>> 'types', except in the context of strings being an array of null-terminated
>> characters, which is the only time I will use variable[subscript] notation.
>> Otherwise, it is a glob of memory with a pointer of a certain type, and I
>> will reference a position in that memory via pointer + num. Really the same
>> thing, but a style difference.

>Ack.  Pointer arithmatic seems to be generally considered bad, except for
>when you are doing assembly programming.

Pointer arithmetic is fine in C. Just don't be a smart-ass about it.
(ie: cast to int, and then come back and dereference.)

------ David Fischer ------- dave at cca.org ------- http://www.cca.org ------
-------- "I prefer the ridiculous to the sublime." - James Chance ---------



More information about the rescue mailing list