From ba57ec24ea432f06fcadd52da4aa82d550e2fc92 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 7 Nov 2011 09:55:22 +0100 Subject: Fix some more bugs in the tutorial Tutorial code going out of date is going to be a recurring problem... --- doc/tutorial/syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/tutorial/syntax.md') diff --git a/doc/tutorial/syntax.md b/doc/tutorial/syntax.md index d0bbf934f45..a3befca02d5 100644 --- a/doc/tutorial/syntax.md +++ b/doc/tutorial/syntax.md @@ -329,7 +329,7 @@ The compiler defines a few built-in syntax extensions. The most useful one is `#fmt`, a printf-style text formatting macro that is expanded at compile time. - std::io::writeln(#fmt("%s is %d", "the answer", 42)); + std::io::println(#fmt("%s is %d", "the answer", 42)); `#fmt` supports most of the directives that [printf][pf] supports, but will give you a compile-time error when the types of the directives @@ -341,4 +341,4 @@ All syntax extensions look like `#word`. Another built-in one is `#env`, which will look up its argument as an environment variable at compile-time. - std::io::writeln(#env("PATH")); + std::io::println(#env("PATH")); -- cgit 1.4.1-3-g733a5