Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.
This repository was archived by the owner on Oct 29, 2019. It is now read-only.

[Suggestion] Multiple returns #2

@theoriginalbit

Description

@theoriginalbit

Lua is a weird language, it can actually return multiple values from functions as individual return values like so

local function foo()
  local bar = 5
  return bar, "hello", "world"
end

Which when called like so means that you only gain one of the values

local v1 = foo()

As such to pickup all values you must either do

local v = { foo() }

or

local v1, v2, v3 = foo()

I think adding the ability to do this in blockly-lua could be handy, especially when starting to build event sensitive programs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions