🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fa.unix-wizards
1 messages
1 total messages Started by ucbvaxunix-wizards Sun, 27 Dec 1981 16:33
arrays in structures
#358
Author: ucbvaxunix-wizards
Date: Sun, 27 Dec 1981 16:33
18 lines
716 bytes
>From alice!ark@Berkeley Sun Dec 27 16:20:40 1981
They are legal, and if they don't work then you must have a buggy compiler.
Example:  I should be able to say:

	struct {
		int a;
		char b[25];
		int c;
	} foo[30];

This allocates space for 30 instances of a structure containing an
int, 25 chars, some padding (1 byte on a PDP-11, 3 bytes on a VAX),
and another int.  I can refer to things like:

	foo[15].a
	foo[x].b[y]

and so on.  I know of no particular bugs that would cause trouble here.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads