skx / gobasic

A BASIC interpreter written in golang.
https://blog.steve.fi/tags/basic/
GNU General Public License v2.0
328 stars 27 forks source link

Something still not right with builtins .. #32

Closed skx closed 6 years ago

skx commented 6 years ago

The whole point of #26 was that we could chain invokations of builtins - such as:

10 PRINT RND RND 100

However this morning I wrote a test-case for int -> string, and I couldn't write it the way I wanted. I wanted to say:

10 LET A = LEFT$ STR$ 4, 5
20 PRINT A

(I expect that to be parsed as "LEFT$ (STR$ 4), 5")

That segfaults which is horrid.

Instead this works, via a temporary:

10 LET A = STR$ 5 20 LET A = LEFT$ A , 5 30 PRINT A

So :+1:

skx commented 6 years ago

New release after this fix though, because the error-handling is so much better, and that's important!