The calculator makes use of the local statement to declare x as a local variable that is available only within the scope of the mycalc function. 这个计算器利用local语句将x声明为局部变量,只能在mycalc函数的范围内使用。
Int X Well, if you declare int X up top, you could certainly update X to one here. 嗯,如果你在顶端声明,你可能把X更新为1了。
What's going on underneath the hood is we 'll see pictorially X today is that when I declare this X, this variable X here. 底下所做的,我们将看到,当我声明这个X,这个变量。