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"))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…