Using Pict (CSCI 6500 Fall 2009)

Pict is installed in the directory /projects/wcl/software/bin/pict. You can login to a Solaris machine by running:

 

$ ssh solaris.remote.cs.rpi.edu

 

To use Pict, you have to set the path of the compiler in your environment, by executing the following command (assuming your environment is bash):

 

coffeepot$ export PATH=$PATH:/projects/wcl/software/bin

 

Now you may want to try compiling some examples. The examples  directory is located in /projects/wcl/software/pict/Examples. You can copy some of the examples to your home directory. For example:

 

coffeepot$ cp /projects/wcl/software/pict/Examples/Simple/hello.pi ~
coffeepot$ cd ~
coffeepot$ pict hello.pi
Hello world

 

You can see the standard output shows "Hello world". Besides, the compiler also produces an executable file called a.out. You can try to execute a.out, and you will see the same result. Of course you can specify the output filename with the option -o. For example:

 

coffeepot$ pict hello.pi -o hello
coffeepot$ ./hello
Hello world

 

The tutorial is available in the directory /projects/wcl/software/pict/Doc. Take a look at it.