-- test of module semantics and qualified name references
@c+
module  testmodules -- test13_1 --
   integer x;
   const num = 2;
   typedef integer int;
private
   integer y;
begin
	x := 1;
	y := 0;
	write testmodules.y;  -- 0
	write testmodules.x; -- ok -- 1
end.

module user
private
begin
	write testmodules.x;  -- 1
	x := 20;  -- correct reference to testmodules.x 
--	write y; -- causes an error, the name is invisible
end.

module nobody
int x;
typedef int range[0..testmodules.num] ran;
.
module redefine
private
  testmodules.int x;
begin
	x := 2;
	write x;  -- 2
	write testmodules.x; -- 20
	write num; -- 2
	write testmodules.num; -- 2
end.
