Wednesday, 17 February 2016

Julia: Triple-Quoted String


Triple quotes are used to create longer blocks of text, If your string span across multiple lines use triple quotes.
julia> msg="""

       Hello

       How are you

       PTR

       """
"Hello\nHow are you\nPTR\n"

julia> msg
"Hello\nHow are you\nPTR\n"

julia> println(msg)
Hello
How are you
PTR



Previous                                                 Next                                                 Home

No comments:

Post a Comment