Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Clearing Arrays In C

2007-04-18 by stevech11

Below, do you mean that the array would be zero'd once each time the
program runs (such as after a reset) ?  The K&R C standard and most
run-time initialization programs do for sure zero static storage once. 

In my experience, it's rather rare to have to repeatedly zero out an
array, from a programming technique and algorithm viewpoint. You might
agree that zeroing an array implies you are later going to read
elements of the array that have never been assigned a computed value.
This is usually poor design.

--- In AVR-Chat@yahoogroups.com, David Appleton <englsprogeny@...> wrote:
>
> Hey Guys,
> 
> Would this work as well?
> 
> 
> 
> static unsigned char array1[100];
> 
> 
> [Non-text portions of this message have been removed]
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.