Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site baylor.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!rochester!rocksanne!sunybcs!kitty!baylor!peter From: peter@baylor.UUCP (Peter da Silva) Newsgroups: net.lang.c Subject: Re: Re: C programming hint Message-ID: <313@baylor.UUCP> Date: Wed, 24-Jul-85 17:21:50 EDT Article-I.D.: baylor.313 Posted: Wed Jul 24 17:21:50 1985 Date-Received: Fri, 26-Jul-85 01:40:30 EDT References: <899@teddy.UUCP> <2412@sun.uucp> <913@teddy.UUCP> <475@osu-eddie.UUCP> Distribution: net Organization: Ancient Illuminated Seers of Bavaria Lines: 18 > In article <913@teddy.UUCP> kps@teddy.UUCP writes: > > > > char blanks[SIZE]; > > blanks[0] = ' '; > > strncpy(blanks + 1, blanks, SIZE - 1); /* initialize entire array */ > > > > ... I've been bludgeoned to death with the fact that my method is > > implementation dependent and that it won't work all the time. > > This actually works in assembly language for the PDP-10. > And of course it's the STANDARD method of initialising an array in FORTH: : fill over c! dup 1+ cmove ; -- Peter da Silva (the mad Australian) UUCP: ...!shell!neuro1!{hyd-ptd,baylor,datafac}!peter MCI: PDASILVA; CIS: 70216,1076