macro ListWindows;

var
	boolean : empty;
	str255 : next,top,list;

begin
	DisposeUnclose;
	list:='Window List'
	NewText(list);
	SelectData(list);
	FrontData(top,'data+text');
	next:=NextData(top,'data+text');
	empty:=CmpStr(next,=,'');
	if(!empty)
		repeat
			writeln(list,next);
			next:=NextData(next,'data+text');
			empty:=CmpStr(next,=,'');
		until(empty);
	elseif
		writeln(list,'No Windows');
	endif;
end;
