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

Allow string multiplication #114

Closed skx closed 3 years ago

skx commented 3 years ago

This pull-request closes #113, by allowing the multiplication operator to be applied to strings:

The following program:

10 PRINT "STEVE" * 3

Will output

STEVESTEVESTEVE

The test-cases were updated to cope with the changes, as previously "STRING * STRING" was invalid and expected to create an error.

skx commented 3 years ago

Worked for me locally. I guess my linters are outdated.

Will update appropriately over the weekend :)