Output format
BlitzMax Forums/BlitzMax Beginners Area/Output format
| ||
Is anyway to format the the result of the 'print' command in the output? It is very helpful to me to use it for debugging. |
| ||
There isn't a command like "Print Using" to create fully-formatted layouts, but you can add in any characters you like for formatting. For example: Local Array[3] For i = 0 To 2 Array[i] = i * 2 Print "Array[" + i + "] = " + Array[i] NextProduces: Array[0] = 0 Array[1] = 2 Array[2] = 4 Escape sequences can also be used to insert special characters like tabs and newlines: ~0 null character (ascii code 0) ~t tab character (ascii code 9) ~r return character (ascii code 13) ~n newline character (ascii code 10) ~q quotation mark (ascii code 34) ~~ single tilde character (ascii code 126) Example: Print "~tLine 1 Tab 1~tLine 1 Tab 2~n~tLine 2 Tab 1~tLine 2 Tab 2" |
| ||
Good enough, thanks. |