catseye / Befunge-93

MIRROR of https://codeberg.org/catseye/Befunge-93 : The NEW reference distribution for Befunge-93!
https://catseye.tc/node/Befunge-93
Other
98 stars 9 forks source link

Cell signedness examples #24

Closed cpressey closed 5 years ago

cpressey commented 5 years ago

Addresses #23 directly by adding a Befunge-93 cell signedness checker, as mentioned there.

I think this PR fixes (either the source or the description of) all the examples in #20 that fail to do what they say because they rely on unsigned char playfield cells. If there are any others where cell signedness is definitely the culprit, they could be added here, though I think in the other cases it is mainly due to other things.

(OK, actually the issues of numer.bf turned out to not be anything about signedness, but it got fixed here anyway.)

cpressey commented 5 years ago

@j4james That's true, so I've rewritten the test program to take a different approach that maybe gets more to the point: the Befunge-93 programmer is interested in what the largest and smallest values they can use are, regardless of how it's implemented under the hood.

(Compatibility between Befunge-93 and Befunge-98 is known to be, um, "approximate", so if running any of these programs in a Befunge-98 interpreter results in hilarity ensuing, I'm fine with that.)