On Sat, 11 Oct 2008, Tamas Rudnai wrote: > > for (j=0; j > { > > s.j = 0; > > } > > In C it looks like: > > memset( &s, 0, sizeof(s) ); > But the above is a special case. With the extension I have described, the C compiler would have the ability to verify that all the members of the structure are ints and produce a warning if they are not. Using the "memset" alternative the compiler is simply told to get on with it and the programmer is left to track down the fault when he/she (some time in the future) adds a new member to the structure. Anyway, regardless of the trivial case above, consider the more interesting situation where we need to save and restore a structure to a file (or maybe send it across a serial or network link): struct SA { int x, y; float a, b; char *str; }; struct SA s; typical current method of doing this: void save_SA(struct SA *s) { serialise_int(&s->x); serialise_int(&s->y); serialise_float(&s->a); serialise_float(&s->b); serialise_str(&s->str); } void restore_SA(struct SA *s) { deserialise_int(&s->x); deserialise_int(&s->y); deserialise_float(&s->a); deserialise_float(&s->b); deserialise_str(&s->str); } alternate method using proposed new variable member: void save_SA(struct SA *s) { for (j=0; jj, type(s->j)); } } void restore_SA(struct SA *s) { for (j=0; jj, type(s->j)); } } Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist