块是可代替单个表达式的一组表达式。块由大括号围绕:
{
	print("Hello there.");
	print("Glad to meet you.");
	print("So long!");
}
例如,if 语句具有以下形式:
if (condition) exp1
exp1 可以是单个表达式:
if ($x > 5)
	print("It's more than 5!");
...或一个表达式块:
if ($x > 5) {
	print("It's more than 5!");
	$x = 0;
	$y++;
}
块在您开始使用条件和循环语句时会变得很重要。
与大多数语言不同,在 MEL 中,块内的所有语句(由大括号围绕)都必须以分号结束,即使是块中唯一的语句。
if ($s > 10) {print("Glonk!")} // Syntax error.
if ($s > 10) {print("Glunk!");} // Notice the semicolon.
块也可以用于限制变量的范围,因为块中声明的任何局部变量仅在该块内可见:
int $test = 10;
{
	int $test = 15;
	print($test+"\n");
}
print($test+"\n");
// Result:
15
10