Busted version of hello/print

This commit is contained in:
Dan Buch 2020-06-08 11:19:33 -04:00
parent 8535deda18
commit 459bfb7caa
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

View File

@ -0,0 +1,23 @@
fn main() {
println!("{} days", 31);
println!("{0}, this is {1}. {1}, this is {0}", "Alice", "Bob");
println!("{subject} {verb} {object}",
object="the lazy dog",
subject="the quick brown fox",
verb="jumps over");
println!("{} of {:b} people know binary, the other half doesn't", 1, 2);
println!("{number:>width$}", number=1, width=6);
println!("{number:>0width$}", number=1, width=6);
println!("My name is {0}, {1} {0}", "Bond");
#[allow(dead_code)]
struct Structure(i32);
println!("This struct `{}` won't print...", Structure(3));
}