Lua std :: map bind不起作用

时间:2017-07-12 02:52:20

标签: lua

我想在Lua中构建一个c ++ std地图,如下所示:

> TWAP { "enable" = 1, "interval" = 120, "pershares" = 2500 }

但是,这是错误:

> cannot run config file:
> /home/tzhang/luatest/alphaless/strategy_config.lua:43: '}' expected
> near '='

我该如何修改?

1 个答案:

答案 0 :(得分:1)

您可以使用以下两种语法风格中的任何一种:

searchField

Function searchField(label)
     Dim objFrame
     Set objFrame = searchWindow(Environment.Value("frameLogin"))
     Set searchField =  objFrame.JavaEdit("attached text:=" + label)       'Javaedit should be the child of the login window. You had to mention the full hierarchy here
End Function

第二个允许你使用变量,如果没有引号使用:

TWAP { enable = 1, interval = 120, pershares = 2500 }