strlen and readfrom
strlen and readfrom
I have and old version of Zues running lua engine 1.30 and both of these variables work perfectly in the new beta version of zues lua 1.64 neither of these variable work. Can anyone offer and ideas?
What you are seeing is a change in the Lua language itself. For more details refer to this Lua reference manual.
For example the code below shows the new strlen way of doing things in Lua:
As for the readfrom function, the Lua FAQ says it has been deprecated:
Cheers Jussi
For example the code below shows the new strlen way of doing things in Lua:
Code: Select all
-- NOTE: get the current word or marked area
local text = macro_tag("$WEX")
if string.len(text) == 0 then
message("The cursor is not over a word!")
beep()
return
end
From Lua 4.x to Lua 5.0, most library functions were moved into tables -- for instance, read() and write() now must be accessed from a global table, for instance, as io.read() or io.write(). Other functions, such as readfrom(), no longer exist. (io.popen() can be used if supported by your platform.)
Cheers Jussi