🚀 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 13:07
Reply to: char arrays
#347
Author: ucbvaxunix-wizards
Date: Sun, 27 Dec 1981 13:07
13 lines
638 bytes
>From gwyn@UTEXAS-11 Sun Dec 27 12:53:53 1981
struct	{
	char	foo[25];
	int	bar;
	}	array[10];
on a PDP-11 (for example) reserves (25+1+2)*10 bytes of storage.  The +1
is required to perform word alignment (not necessary on VAX).  I don't
know why your bug happened; most likely are (1) coding error or (2)
compiler bug.
Incidentally,
typedef	char	foo[3];
really does make "foo" a 3-byte long data type (amazing!).
-------
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