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

It is impossible to avoid infinite loops

skx opened this issue · comments

Consider the following input:

10 GOTO 10

That program will never terminate, and an application which embeds this interpreter cannot catch it either.

Add a SetContext method, or NewWithContext, to allow handling this.