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.

15 rivejä
247 B

  1. mod m1{
  2. pub fn a(){
  3. println ! ("module m1") ;
  4. }
  5. pub mod m2 { // module embarqué
  6. pub fn b(){
  7. println ! ("module m2") ;
  8. }
  9. }
  10. }
  11. fn main(){
  12. m1::a() ;
  13. m1::m2::b() ; // exécute le module et la fonction embarqués
  14. }