Dashboard > Mantra > ... > Documentation > Scripts
  Mantra Log In | Sign Up   View a printable version of the current page.  
  Scripts
Added by Terence Parr, last edited by Terence Parr on Nov 03, 2007  (view change)
Labels: 
(None)

There is no main method like there is in Java. The way you execute mantra code is simply to run the tool on a file full of statements. Here is a sample run:

$ java mantra.Tool
<stdin>
println("hi, mom");
hi, mom

Note that mantra takes in an entire program and translates it to Java, compiles it, and then runs it. Mantra is not an interpreter and cannot process line by line like Python or Ruby.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators