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.

13 lines
255 B

  1. mod mon_module {
  2. pub fn a() {
  3. println ! ("fonction a") ;
  4. b() ; // appelle la fonction privée b
  5. }
  6. fn b() { // la fonction b est privée
  7. println ! ("fonction b") ;
  8. }
  9. }
  10. fn main() {
  11. mon_module::a() ;
  12. }