Suggestion for pretty_print()
- Posted by Juergen Luethje <j.lue at gmx.de> Dec 02, 2005
- 577 views
Hello Rob, the following code snippet:
include misc.e constant text = { "This is\tline 1.\n", "Here comes\tline 2.\n" } pretty_print(1, text, {3})
prints (Eu 2.5): { {'T','h','i','s',' ','i','s',9,'l','i','n','e',' ','1','.',10}, {'H','e','r','e',' ','c','o','m','e','s',9,'l','i','n','e',' ','2','.', 10} } But using the option {3}, pretty_print IMHO should output a string _whenever possible_. Of course sometimes it's not possible, but special characters that may be entered using a back-slash (as described in refman_2.htm#char), should be displayed by pretty_print() in the same way, and not cause an output as shown above. The output in this case should be identical to the data, i.e. { "This is\tline 1.\n", "Here comes\tline 2.\n" } Regards, Juergen