From 2e5d18c15e625a359d8c15e940d557c6e6102322 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 3 May 2020 01:19:57 +0800 Subject: [PATCH] add format --- single_file_tests/format.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 single_file_tests/format.rs diff --git a/single_file_tests/format.rs b/single_file_tests/format.rs new file mode 100644 index 0000000..b21c3e9 --- /dev/null +++ b/single_file_tests/format.rs @@ -0,0 +1,11 @@ + +fn main() { + let a = 1111111; + + println!("{}", a); + println!("pointer: {:p}", &a); + println!("binary: {:b}", a); + println!("octet: {:o}", a); + println!("0x{:x}", a); + println!("0x{:X}", a); +} \ No newline at end of file