Skip to content

Else statement syntax unclear #86

@micheldebree

Description

@micheldebree

If I don't use the right syntax, I get a cryptic error. There is no example on the site of the right syntax.

Works:

!if (debugging) {
  lda #0
} else {
  lda #2
}

Fails:

!if (debugging) {
  lda #0
} 
else {
  lda #2 ; line 76
}

Error test.asm|76 col 7| error: Syntax error: Expected ":" but "#" found.

I would expect either for both statements to work, or have a clear message about what exactly I am doing wrong.

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