Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

how return more then 1 level of callers in lua?

something like in Forth when your drop 1 value from stack of returns?

    arrSimpleConv=
          (function(result,base)if not base then return  nil end
  for rec in (function(rst) if not rst then return pairs({}) end 
                       rst:Sort{{field=5,descent=true},{field=7},{field=10}}
                return rst.Records end)(base.RecordSet) do
    result[#result+1]= { 
                         Type = rec:GetValue(5),
                         LegName = rec:GetValue(10),
                         PickName = rec:GetValue(11),
                         FlagHierarch = tonumber(rec:GetValue(30)),
                         Rules = (function(result,input)
                                for i,p in ipairs(input) do
                                  result[i] = table.unserialize(p)
                                end return result end)({},rec:GetValue(20, 0))
                       }
  end return result end)(arrSimpleConv or {},CroApp.GetBank():GetVocabulary():GetBase("XX"))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.9k views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...