Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 334 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 334 Bytes

Functions:

  • main.rs:

  • basic functions:

fn main() {
   helloworld(); 
}

fn helloworld() {
    println!("Hello, World");
}
  • passing strings to a func
fn main() {
    let name:String = String::from("NameOne");
    display(name);
}

fn display(param_name:String) {
    println!("Name: {}", param_name);
}