Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- using scope Spark.*; // Utilisera tout les scopes disponibles dans Spark. pour éviter les noms pompeux style Spark.io.print
- define scope MyStuff
- {
- string myFunction()
- {
- return "Hello, ";
- }
- float pi = 3.1415;
- }
- using scope MyStuff;
- int main()
- {
- print << MyFunction() << endl; // Le nom pompeux serait : Spark.io.print << MyStuff.myFunction() << Spark.io.endl;
- print << "Let's play ! Give me Pi with 4 decimals !" << endl;
- if(pi==getline())
- {
- print << "Correct !" << endl;
- }
- else
- {
- print << "Hmmm..too bad :/" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement