# Using a variable to format printf not allowed?

**URL:** <https://discourse.julialang.org/t/using-a-variable-to-format-printf-not-allowed/99200>\
**Category:** New to Julia\
**Tags:** pretty-printing\
**Created:** [May 22, 2023, 8:08am UTC](https://discourse.julialang.org/t/using-a-variable-to-format-printf-not-allowed/99200 "2023-05-22T08:08:06Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![fatteneder](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fatteneder/32/33991_2.png) [@fatteneder](https://discourse.julialang.org/u/fatteneder)\
**Post date:** [May 22, 2023, 5:41pm UTC](https://discourse.julialang.org/t/using-a-variable-to-format-printf-not-allowed/99200/7 "2023-05-22T17:41:21Z")

</div>

> [@mmv](#):
>
> Do you know where I can find the documentation for `Printf.Format` and `Printf.format`? Most URL links on the Internet lead to the page [Printf · The Julia Language](https://docs.julialang.org/en/v1/stdlib/Printf/#man-printf) which does not say anything about the formats, or how this differs from `printf`… Thanks again.

Like @Barget said, try the `?` operator:

```julia
help?> Printf.Format
  Printf.Format(format_str)

  Create a C printf-compatible format object that can be used for formatting values.

  The input format_str can include any valid format specifier character and modifiers.

  A Format object can be passed to Printf.format(f::Format, args...) to produce a formatted
  string, or Printf.format(io::IO, f::Format, args...) to print the formatted string directly
  to io.

  For convenience, the Printf.format"..." string macro form can be used for building a
  Printf.Format object at macro-expansion-time.

  │ Julia 1.6
  │
  │ Printf.Format requires Julia 1.6 or later.

```

---

_[View the full topic](https://discourse.julialang.org/t/using-a-variable-to-format-printf-not-allowed/99200)._
