Skip to content

Feature: Add support for multi-way conditional(s) #27

@aghast

Description

@aghast

Just fixed a syntax error by replacing this:

if k < 25 then 
    # ...
else if k < 40 and arg == 0 then 
    # ...
else
    # ...
end

With this:

if k < 25 then 
    # ...
else
    if k < 40 and arg == 0 then 
        # ...
    else
        # ...
    end
end

Yow! Bash definitely gets that right with elif. And also case.

I don't know if case or match or cond is better, but I fervently believe that elif needs to be added. Wow, is it painful to statically nest if/else blocks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions