lua-users home
lua-l archive

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


assert(_VERSION:match("3"))

= 27 characters

On Sun, Dec 13, 2020 at 6:02 PM Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
Hi!

The task: write a Lua program which runs only on Lua 5.3.
It should not run under other Lua versions (5.1, 5.2, 5.4, LuaJIT):
either a compile-time or a run-time error should occur.

For example, the following program is Lua 5.3-only and its length is 41 bytes:
if _VERSION~="Lua 5.3" then error("") end

This is a codegolf: the shortest Lua 5.3-only program wins.