Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@printf doesn't handle multi-line strings. #9528

Closed
Ismael-VC opened this issue Jan 1, 2015 · 1 comment
Closed

@printf doesn't handle multi-line strings. #9528

Ismael-VC opened this issue Jan 1, 2015 · 1 comment

Comments

@Ismael-VC
Copy link
Contributor

This doesn't work and I think it would be very handy:

julia> @printf """
               This is a %s
               """ "test"
ERROR: @printf: format must be a plain static string (no interpolation or prefix)


julia> macroexpand(
           quote
               @printf """
                       This is a %s
                       """ "test"
           end
       )
:($(Expr(:error, ErrorException("@printf: format must be a plain static string (no interpolation or prefix)"))))

julia> dump(ans)
Expr 
  head: Symbol error
  args: Array(Any,(1,))
    1: ErrorException 
      msg: ASCIIString "@printf: format must be a plain static string (no interpolation or prefix)"
  typ: Any

How do we define a plain static string?

@ivarne
Copy link
Member

ivarne commented Jan 1, 2015

Dup of #2682

@ivarne ivarne closed this as completed Jan 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants