Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A semicolon can cause following spaces to be suppressed in a string #7

Open
j4james opened this issue Nov 24, 2017 · 0 comments
Open

Comments

@j4james
Copy link

j4james commented Nov 24, 2017

For example, the code below:

"] ; ; ; ; ; [">:#,_@

should be expected to produce the following output:

[ ; ; ; ; ; ]

However, on FBBI the output looks like this:

[;;;;; ]

What's happening is the later spaces are mistakenly detected as an uninterrupted series, and a series of spaces is expected to be collapsed into one in Befunge-98. The source of the problem is the ip_move function, which has an early exit when a ; is encountered in stringmode. This prevents the spacemode (pm) variable being reset, which would usually occur at the end of the of the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant