HomeTable of ContentsNext Chapter | ||
NAVIGATIONGetting StartedGet StanzaDownload StanzaInstalling on Linux and OS-XPut Stanza in your PathInstalling on WindowsTestCompile an ExampleRun the ExampleWrite a ProgramBasic SkeletonMore println StatementsDelete the Call to mainRename main |
Getting StartedThis chapter explains how to download and install Stanza for your system, compile the example programs, and also write your own very first Stanza program. Get StanzaDownload StanzaNavigate to The main Stanza compiler should be located at
and the core and collections libraries should be located at
Installing on Linux and OS-XIf you're on a linux platform, open the terminal and type
If you're on Mac OS-X, then type instead
This creates a Put Stanza in your PathType the following if you want to be able to call Stanza from any working directory.
Installing on WindowsOpen
This creates a Running Stanza on windows additionally requires the MinGW-w64 port of the gcc compiler. Download the At the time of writing, the
TestType the following in the terminal
It should print out the version of the Stanza compiler that you downloaded. If you don't see this, then double check that
Compile an ExampleType the following in the terminal
This should compile the
Run the ExampleType the following to run the compiled executable. It should print out "hello world".
If you're running Windows, then type either
or
Congratulations! You've successfully installed Stanza! Now try compiling and running the other examples in the Write a ProgramBasic SkeletonCreate a folder called
Make sure you don't forget the space between the
It should print out
More println StatementsSurround the call to
Run the program again and it should print out
The program runs in the order that it sees the top-level statements. Delete the Call to mainDelete the call to
Now the program prints out
If you don't call Rename mainRename the
The program still prints out
There is nothing special about the |
|
Site design by Luca Li. Copyright 2015. |