官方手册里早已经给了答案,那就是靠lua内置的next函数 即如此用: a = {} if next(a) == nil then next其实就是pairs遍历table时用来取下一个内容的函数. 但是如果 a= nil 就会报错,所以还要先判断一下 a是否为nil. 于是封装后判断的lua table是否为空的函数如下: function tableIsEmpty(t) if t == nil then return true end return _G.next(t) == nilend
Table Properties [AX 2012] 1 out of 2 rated this helpful - Rate this topic Updated: July 20, 2012 Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012 This topic describes the properties that