Skip to content

Unusual operator associativity and precedence #299

@leque

Description

@leque

In SATySFi, /, *, mod, and + are right associative, i.e. 4 / 2 / 2 = 4 / (2 / 2), not (4 / 2) / 2, thus evaluated to 4. In addition, + has lower precedence than -, so 1 + 2 - 3 = 1 + (2 - 3).

Is this a bug or intended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions