Advertisement
MyPix

Spark prototype

Sep 12th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import Spark; // Importe toute les définitions externe à Spark, par exemple les variables "raccourci" comme endl (qui se traduirait par "/n", sera très peu inutile et pourra être omis dans les premieres versions de spark)
  2. using scope Spark.*; // Utilisera tout les scopes disponibles dans Spark. pour éviter les noms pompeux style Spark.io.print
  3. define scope MyStuff
  4. {
  5. string myFunction()
  6. {
  7. return "Hello, ";
  8. }
  9. }
  10. using scope MyStuff;
  11. int main()
  12. {
  13. print << MyFunction() << endl; // Le nom pompeux serait : Spark.io.print << MyStuff.myFunction() << Spark.io.endl;
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement