8000 Incrementing list (state machine) out of index nulls it · Issue #935 · inkle/ink · GitHub
[go: up one dir, main page]

Skip to content

Incrementing list (state machine) out of index nulls it #935

Open

Description

@menaechmi

Borrowing from the example in the Writing with Ink book:

LIST PancakeState = ingredients_gathered, batter_mix, pan_hot, pancakes_tossed, (ready_to_eat)
{PancakeState} (Prints "ready_to_eat")
~ PancakeState++
{PancakeState} (PancakeState doesn't print)
~ PancakeState--
{PancakeState} (PancakeState doesn't print)

In this case, nulling the variable is just failing silently, and could lead to problems. I would suggest either raising an exception, or not incrementing the index (which seems like the more ink way to do it)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0