Question

I expect that I should be able to write Rascal programs as files or modules, and then run them with "Run as ...", but that does not work. What file extension should Rascal modules have? What is the console for? Can you run programs in batch mode or only from the console? Is there a step-by-step tutorial? (The Rascal Tutor does not explain this as far as I can tell.)

Était-ce utile?

La solution

  • The file extension is .rsc, but there is also a wizard for "New Rascal Module" which will ask only for a name and generate the right file with some content for you.
  • The console is used to try out expressions or your own modules interactively. You can use it to import your own module and then call a function in this module.

    rascal>import MyModule;

    ok

    rascal>myFunc();

    int: 0

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top