Skip to content
Snippets Groups Projects
Commit 9eb6ad0e authored by anttib-5's avatar anttib-5
Browse files

bare3_2

parent 2f004d56
No related branches found
No related tags found
No related merge requests found
...@@ -18,8 +18,10 @@ use cortex_m_semihosting::{hprint, hprintln}; ...@@ -18,8 +18,10 @@ use cortex_m_semihosting::{hprint, hprintln};
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {
hprintln!("bare3").unwrap(); hprintln!("bare3").unwrap();
let s = "ABCD"; let s: &str = "ABCD";
let bs = s.as_bytes(); let bs: &[u8] = s.as_bytes();
let c: &u8;
let i: &i32;
hprintln!("s = {}", s).unwrap(); hprintln!("s = {}", s).unwrap();
hprintln!("bs = {:?}", bs).unwrap(); hprintln!("bs = {:?}", bs).unwrap();
...@@ -36,7 +38,7 @@ fn main() -> ! { ...@@ -36,7 +38,7 @@ fn main() -> ! {
hprintln!("").unwrap(); hprintln!("").unwrap();
let a = [65u8; 4]; let a: [u8; 4] = [65u8; 4];
//let mut a = [0u8; 4]; //let mut a = [0u8; 4];
hprintln!("").unwrap(); hprintln!("").unwrap();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment