lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 5 August 2013 15:56, Chris Datfung <> wrote:
> local headers = gmail:search SearchFilter

`fun "str"` is just a Lua syntax sugar for `fun("str")` [1]. This only works for string literals, when you have a variable or any _expression_, you need to use the classic syntax with parentheses (), which means:

local headers = gmail:search("SUBJECT Test Since " .. yesterday)
local headers = gmail:search(SearchFilter)