skx / gobasic

A BASIC interpreter written in golang.

Home Page:https://blog.steve.fi/tags/basic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement XOR.

skx opened this issue · comments

We could add this easily.

See #46 for a similar issue, and #49 which implemented it.

I'll leave this open for a week, if nobody claims it by then I'll implement it myself.

Biggest difference in the previous pull-request is that we have to handle the token "XOR", and the new operation will be dropped into eval.go in the function expr.

Test case:

10 LET a = 128 XOR 1
20 PRINT a, "\n"

Should print 129.