problems with schema parameter

Martin Kalbfuß ma.kalbfuss at
Sat May 30 21:03:48 CEST 2009

I wrote the following code:

PROCEDURE play( map : map_type );

	player1 : player_type( 'O', 'a', 'd', 'w', 's', red, right, 10, 10,
3 );
	player2 : player_type( 'O', Crt.ksLeft, Crt.ksRight, Crt.ksUp,
Crt.ksDown, green, left, 15, 15, 3 );
	table	:	table_type_ptr;


	new( table, map.width, map.height );




And here are the important types:

	x_coordinate_type = 1..table_width;
	x_dimension_type = 1..table_width;

	map_type( w, h, p1x, p1y, p2x, p2y : INTEGER ) = RECORD

		width       : x_dimension_type VALUE w;
		height      : y_dimension_type VALUE h;
		player1_pos : player_pos_type VALUE [ p1x; p1y ];
		player2_pos : player_pos_type VALUE [ p2x; p2y ];
		collision   : BOOLEAN VALUE FALSE;
		data        : ARRAY[ 1..h, 1..w ] OF CHAR;	


	table_type( w, h : INTEGER ) = ARRAY[ 1..h, 1..w ] OF field_type;
	table_type_ptr = ^table_type;

When I want to compile the code I get the following error:

snake.pas: In procedure `play':
snake.pas:203: internal compiler error: in process_otherwise, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.

The problem is the call to new. Is this my fault?

More information about the Gpc mailing list