Orphaned Response - (nf)

bhyde at inmet.UUCP bhyde at inmet.UUCP
Tue Jan 24 20:42:51 AEST 1984

inmet!bhyde    Jan 22 17:25:00 1984

This will work; f1, f2, and f3 are necessary.  Of course I didn't want
to have f1, f2, and f3, but then it occurs to me that this isn't Ada
and suddenly I am happy.
						Ben Hyde, Intermetrics Inc.

typedef int elem;  		/* An element				     */
typedef elem feature_vec[];	/*   held in an array     		     */
typedef feature_vec *features;	/*	with pointers to those arrays        */
typedef features ftable[];	/*         which are themselfs in an array.  */

feature_vec f1 = {1,2,2,0};
feature_vec f2 = {2,3,0};
feature_vec f3 = {2,4,0};
ftable success = { (features)f1, (features)f2, (features)f3};
	/* the casts are necessary or one gets warnings, why I don't know */

The zero element is being used here to mark the ends of a feature_vec, analogous
to the zero element at the end of a string.

Sam Haradhvala, my coworker here, said that in his application the
ftable success was automaticly generated  and that the set of all f1,
f2, f3... overflowed one of the many target machine linkers.  In such
cases one can do:
feature_vec f1 = {1,2,2,0,
ftable success = { (features)&f1[0], (features)&f1[4], (features)&f1[7]};

More information about the Comp.lang.c mailing list