[rust-dev] to ! or not to !

Steven Fackler sfackler at gmail.com
Fri Mar 14 14:54:41 PDT 2014


println is a function in std::io that prints strings to standard out.
println! is a macro that allows for formatted output (e.g. println!("hello,
{}!", "world")). More details here:
http://static.rust-lang.org/doc/master/std/fmt/index.html

Steven Fackler


On Fri, Mar 14, 2014 at 2:52 PM, Renato Lenzi <rexlen at gmail.com> wrote:

> Simple question:
>
> println("hello");
>
> or
>
> println!("hello!");
>
> Why (or when) should we use one or the other form?? Differences?
>
> Regards.
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140314/b3c3b66b/attachment.html>


More information about the Rust-dev mailing list