Page 2 of 2

Posted: Mon Mar 28, 2005 10:01 pm
by Rescator
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.

Posted: Mon Mar 28, 2005 10:22 pm
by Psychophanta
dracflamloc wrote:Wtf are you talking about, haha

Are you trying to state basic knowledge that a chr() command creates one character, and "\n" is two characters?

I BOW DOWN TO YOUR AMAZING KNOWLEDGE AND BEG YOU TO FATHER MY CHILDREN!

:roll:

no offense or anything...
No ofense, don't worry, but i didn't try to teach, i just tried to you to realize of that fact.

BTW: all of us have lots of things to learn ALWAYS, and i'd say also that all of us have lots of things to teach.

Posted: Tue Mar 29, 2005 2:39 am
by dracflamloc
No it was just my inner sarcasm kicking in...

At any rate. There really isn't much to be considered since the escape characters for strings should just behave how they do in C.