$c+
module test13
private
{ test of tuple component extraction }
	 integer a,b,x;
	 tuple [integer first, integer second ] pair;
	 
	 
 begin
	 read b; { Use 2 as input value. }
	 x := 1;
	 a := b + x;
	 pair := [x , b + 1];
	 write pair@first, pair@second - 2; { 11 }
	 if b = 2 ->	a := 1;
	 		b := 1;
	 [] b = 100 ->	a := 6;
			b := 100 / a;
	 [] b # 2  -> skip;
	 fi;
	 write a, b, x, b*x ; {1111}
	 pair@second := 1;
	 write pair@first, pair@second; {11}
	{-- semantic check run once with the next 2 statements
	 -- and once without. }
	write pair@foo;  {error}
 end.  { 1 error with final statement}
