Statement list expression
Statements can also occur in an expression context that looks like (stmt1; stmt2; …; ex). This is called a statement list expression or (;). The type of (stmt1; stmt2; …; ex) is the type of ex. All the other statements must be of type void. (One can use discard to produce a void type.) (;) does not introduce a new scope.
当前内容版权归 nim-lang.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 nim-lang.org .