Des exemples de code pour programmer en Rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 rivejä
245 B

  1. fn main(){
  2. let num:i32 = 3 ; // expression donnée
  3. match num {
  4. 1 => println ! ("un"),
  5. 2 => println ! ("deux"),
  6. 3 => println ! ("trois"), // correspond à ceci
  7. 4 => println ! ("quatre"),
  8. _ => println ! ("quelque chose d'autre"),
  9. }
  10. }