//
PROC main;
	try;
//		throw 100;
	catch ERROR == -1;
		if 1;
			$1 = 0;
		//	catch;
		end if;
		loop 1;
			$1 = 2;
		end loop;
	end try;
//	throw 100;
try;
	try;
		$1 = 1;
		print $1;
		exec ip pp;
	catch USER_EXCEPTION;
		print /x EXCEPTION;
		if EXCEPTION & 1;
			print "(EXCEPTION & 1)";
		end if;
		if EXCEPTION & 2;
			print "(EXCEPTION & 2)";
		end if;
//	finally;
	finally;
		print 'Finally';
//	catch -2;
	end try;
	print EXCEPTION;
finally;
	print 'Finally0';
end try;
	print 'last';
	RETURN $ERROR;
END PROC;

proc pp;
//	return 0;
//	return -1;
//	return -2;
	throw -3;
	try;
//		exit();
	//	return -1;
		fopen('xxxxx');
	catch FILE_OPEN_EXCEPTION;
		print 'catch file open' ERRMSG;
	catch ;
	//	a();
		print 'catch all' ERRMSG;
	finally;
		print 'pp:Finally';
	end try;
//	exit(ERROR);
	return ERROR;

//exception;
end proc;
