Skip to content

Input() Causes Error in If Statements #10

@matthewl580

Description

@matthewl580

Describe the bug
INPUT() Breaks if statements
To Reproduce
Steps to reproduce the behavior:

  1. Downlaod Spinde
  2. Create a file and type the below code into it
  3. Run the file and observe
b <-- INPUT()
DISPLAY(b)
IF (a==b ){
    DISPLAY("hi")
    RETURN 1
}

Expected behavior
The language asks for input, and then runs the if statement as normal
Screenshots
not needed. here is the error:

  1. File <stdin>, line 4, in <program>
Runtime Error: Illegal operation


 IF (a==b ){  
     ^^^^^^^^^
  
^^
     DISPLAY("hi") 
^^^^^^^^^^^^^^^^^^^
     RETURN 1 
^^^^^^^^^^^^^^
 } ELSE{ 
^^^^^^^^^
 }
^^^^^^^^^
 ELSE {}
^^^^^^^^

Desktop (please complete the following information):

  • OS: [e.g. iOS] WINDOWS
  • Browser [e.g. chrome, safari] NATIVE
  • Version [e.g. 22] 1.2 BETA

Additional context
At first glance this may seem to be a problem with the add_else_to_if function, but it only happens with inputs - so something is happening there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions