Re: Interpreter Mod We Can All Get Behind

new topic     » goto parent     » topic index » view thread      » older message » newer message

Btw, what is the deal with newlines in a triple quote?
One thing I would probably use it for is help/messagebox text, which is always a
right pain with the " and \n"& requirements, especially if they break your
stride/concentration when explaining something difficult.
In this case, I would want the newlines, is this what others expect?
Eg
"""
one
two
three
"""
is "one\ntwo\nthree\n" not "one two three".

Gary Shingles wrote:
> 
> The other option I liked was the one Derek mentioned from D, automatically 
> concatenating sequential character strings.

I have a couple of problems with that.
1) It is no easier to convert:

The quick brown fox 
jumped over the lazy dog

to:

"The quick brown fox "
"jumped over the lazy dog"

than it is to convert it to:

"The quick brown fox "&
"jumped over the lazy dog"

Obviously it gets messier when you've got dozens or hundreds of lines.
Conversely, to triple quote is +6 chars total no matter how many lines.

2) If you write, say
constant words = {"ONE",
                    "TWO",
                    "THREE"
                    "FOUR",
                    "FIVE"}

then words[4] will be "FIVE". If anything, I'd prefer it to treat a missing
comma as if it had found one.

Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu