And sure enough with Julia 0.2.1.
julia> print(["\"hello\"", "world\""])
"hello"
world"
vs. with 0.3.0-prerelease+2220 (2014-03-29 19:38 UTC) Commit 2aaa9f7*
julia> print(["\"hello\"", "world\""])
"""hello"""
world"
First problem with the new REPL???
On Saturday, 29 March 2014 20:40:42 UTC, Samuel Colvin wrote:
>
> I would say the problem is with the way REPL deals with printing the
> array, not the definition. See below, when part of array is printed on it's
> own all seems well.
>
> julia> a=["\"hello\"", "world\""]
> 2-element Array{ASCIIString,1}:
> "\"hello\""
> "world\""
>
>
> julia> a[1]
> "\"hello\""
>
>
> julia> print(a[1])
> "hello"
> julia> print(a)
> """hello"""
> world"
>
>
>
> On Saturday, 29 March 2014 20:29:56 UTC, Ethan Anderes wrote:
>>
>> Hi Everyone
>>
>> The following behavior confuses me:
>>
>> julia> print(["hello", "world"])
>> hello
>> world
>>
>> julia> print(["\"hello\"", "world\""]) # <-- print triple quotes on hello
>> but a single quote on world
>> """hello"""
>> world"
>>
>> Am I not using the escape command \" correctly? This came up for me when
>> I needed to write a csv file with entries that had quotes. Writedlm kept
>> writing triple quotes.
>>
>> Thanks! Ethan
>>
>>