Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!ut-sally!ut-ngp!jjr From: jjr@ut-ngp.UUCP Newsgroups: comp.lang.c Subject: Copying Structures Message-ID: <4741@ut-ngp.UUCP> Date: Fri, 20-Feb-87 21:51:17 EST Article-I.D.: ut-ngp.4741 Posted: Fri Feb 20 21:51:17 1987 Date-Received: Sat, 21-Feb-87 16:17:04 EST Reply-To: jjr@ngp.UUCP (Jeff Rodriguez) Organization: U. of TX at Austin, Dept. of Elec. Engr. Lines: 12 Consider typedef struct { float foo[100], bar[100]; } mytype; mytype x, y; I have found that y = x; does the same thing as for(i = 0; i < 100; i++) { y.foo[i] = x.foo[i]; y.bar[i] = x.bar[i]; } Is this shortcut portable? Does the ANSI standard allow it? Jeff Rodriguez jjr@ngp.utexas.edu