Posted: Mon Mar 28, 2005 10:01 pm
You have issues drac, that was pure flaming!
I agree with Psyco, support for such has to be considered carefully!
1. Should the compiler turn any \n in any string into a Chr(13) or only when used with PrintN
2. if only with PrintN then how should the compiler handle \n other places? And PrintN would get a reduced stringlength, though again this depends on how the compiler handles strings.
3. How should \n be possible? As \\n or a different way? And what about \e etc, treated as a escape code and ignored since it's wrong, return a error, or treat as just \e and print that as if it was \\e ?
I definetly don't like the NPrintN, NPrint, or whatever. it's messy.
I also don't like the Chr() solution (if it worked that is, here it seems that ascii 10 and 13 isn't handled properly by the codepage *shrug*)
Using +#CRLF$+ is just as messy.
Thing is. there is no point adding escape chars just to Print.
There would be no benefit for all that extra code work for Fred except just console programmers users.
Any escape char implementation has to be for all strings.
Altough a alternative could be a PrintF command, that supports a C like output formatting.
and a PrintS that does the same but instead of actually printing it returns a formatted string.
I think a PrintF and possibly a PrintS may be a more usefull way.
Esp. considering that just adding \ as escape char to Print and PrintN
would possibly break any current code that uses Print or printN
and actually outputs \ chars.
I agree with Psyco, support for such has to be considered carefully!
1. Should the compiler turn any \n in any string into a Chr(13) or only when used with PrintN
2. if only with PrintN then how should the compiler handle \n other places? And PrintN would get a reduced stringlength, though again this depends on how the compiler handles strings.
3. How should \n be possible? As \\n or a different way? And what about \e etc, treated as a escape code and ignored since it's wrong, return a error, or treat as just \e and print that as if it was \\e ?
I definetly don't like the NPrintN, NPrint, or whatever. it's messy.
I also don't like the Chr() solution (if it worked that is, here it seems that ascii 10 and 13 isn't handled properly by the codepage *shrug*)
Using +#CRLF$+ is just as messy.
Thing is. there is no point adding escape chars just to Print.
There would be no benefit for all that extra code work for Fred except just console programmers users.
Any escape char implementation has to be for all strings.
Altough a alternative could be a PrintF command, that supports a C like output formatting.
and a PrintS that does the same but instead of actually printing it returns a formatted string.
I think a PrintF and possibly a PrintS may be a more usefull way.
Esp. considering that just adding \ as escape char to Print and PrintN
would possibly break any current code that uses Print or printN
and actually outputs \ chars.