You probably don't want to use 1 (no quotes) for a default value for the squares - when output as a character, that becomes ASCII 1, which is a control character - how it is represented on screen varies depending on where you do it: it might be a weird happy-face looking thing (in a console window), a ^ followed by A (in gVim, for example; or in a telnet window) or nothing visible at all (most other place I can think of).
' ' will print as a space, which is probably more like what you want. The actual numeric value is 32, assuming ASCII (which is pretty safe these days).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement