Suggestion: include unprintable characters in the error messages

One error message that comes up again and again in the Ragnarok - Power Of Thor puzzle discussion is the following.

Expected a movement (one of N, NE, E, SE, S, SW, W, NW) but found 'E'

A beginner can’t get anything from that error message. It would be a lot more helpful if that error message did include unprintable characters.

Expected a movement (one of N, NE, E, SE, S, SW, W, NW) but found '\0E'
3 Likes

Another example here where this could have helped.

For this error, is there also the case when it’s expected “E\n” and not “E” ?

I’m not sure if I understand your question.

In most languages you have to flush the output stream, or else your output just sits in a buffer and never gets printed. To do that you can either use the appropriate function (called flush or something similar) or end your output with a newline.

If you don’t do it you get the message that “your program didn’t provide any output”.

Fixed for in/out, coming soon for games!