From: Gavin L. <md...@mi...> - 2004-02-09 20:02:08
|
At 00:51 28/01/2004 +0000, Luke-Jr wrote: > >How should non-printable characters be represented in strings? >Is C-style escaping of common characters (\n, \r, \t, \v, \x##, >etc) a good idea? Including C-style's \### which uses octal or >should \### use decimal (or hex?)? I've always regarded C-style escaping as a little messy... but then, that's mostly because I need to use the backslash a lot for paths and the like. One possible alternative (though I don't really know if it's any better) is to use Delphi-style escaping, a la: "This is a string with"#10"a newline in the middle." "This is a string with "" a double-quote in the middle." "This is a string that " + "spans two source lines." Of course, the latter example is already valid in MOO code, but of course the internal compiler/decompiler will merge it back onto one source line. -- Gavin Lambert, Mirality Systems <http://www.mirality.co.nz/> ---- Pardon me, waiter. I like my water diluted. |