NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
数组访问通过使用开口的 [ 方括号,后跟索引表达式 ,并以闭口的方括号 ]结束。 > Array access is expressed by using an opening bracket [ followed by the index expression and a closing bracket ]. ~~~ expr[indexExpr] ~~~ 这个符号允许使用任意表达式,但是在类型级别,只有某个组合被承认: > This notation is allowed with arbitrary expressions, but at typing level only certain combinations are admitted: * expr 是Array或者 Dynamic 类型,indexExpr是Int类型 * expr是一个抽象类型(第2.8节),定义要给匹配的数组访问(第2.8.3节) > * expr is of Array or Dynamic and indexExpr is of Int > * expr is an abstract type (2.8) which defines a matching array access (2.8.3)