Γ USA G2 

 Information 
 Downloading 
 Installation 
 Base Demos 
  · Demo 1
   -- Compile
   -- Execute
  · Demo 2
  · Demo 3
  · Demo 4
  · Plotting
 Tutorials 
 Examples 
 Online Pgms. 
 HTML Docs 
 PDF Docs 
 Administer 
 NHMFL 
 CIMAR 

 Γ WWW Sites 

 MainSite, USA 
 Florida, USA 
 Florida, USA 
 Zürich, CH 
 Osaka, Japan 
 
GAMMA Base Demo 1
(Γ Version 4.0.4β)
 

 
Simple I/O & GAMMA Matrix
This program uses only a simple matrix and some standard output. No input is required. Have a quick look at the source code (demo1.cc). All it does is make a matrix and then write it to the screen.

The expected output will look like the following:

   Hello World
             
   The Matrix I Just Made: GAMMA 4 x 4 Diagonal Matrix
             
             (  4.00 ,  0.00)
                   (  4.00 , 0.00)
                         (  4.00 , 0.00)
                               (  4.00 , 0.00)
             

BACK TO TOP

 

Compiling Demo 1

The executable program can be generated from the shell prompt by invoking the C++ compiler with the proper arguments. There is a prepared script file, gamma which contains the proper call to the compiler with library links, etc. This assumes that you have a working GNU C++ on your system, a compiled GAMMA library with headers (>= Version 3.5) and an accesible gamma command.

To compile the program issue the command (where the command start gamma1:ssmith> is my system prompt)

gamma1:ssmith>gamma demo1.cc

The following is the dialog one might expect from this compilation

gamma1:ssmith>gamma demo1.cc


               G  A  M  M  A
                                 
               (Version 3.5)
 
  Written by Scott Smith and Tilo Levante
 
            Dr. Scott A. Smith
  National High Magnetic Field Laboratory
         1800 E. Paul Dirac Drive
      Tallahassee FL USA 32306-4005
           ssmith@magnet.fsu.edu
 
 
The Compilation Is Specific To sun4

This will produce the executable program named (by default) a.out on a Unix/Linux system and a.exe by default under WinTel.


BACK TO TOP

 

Executing Demo 1

The executable program (a.out or a.exe) can be now be run by issuing the command a.out in the command window.
gamma1:ssmith>a.out
               
No input arguments are required and the output has been shown at the top of this page.

BACK TO TOP

 
       
Γ Support Provided by the National High Magnetic Field Laboratory
© 1996 S.A. Smith, The NHMFL, and Florida State University.
All Rights Reserved.
No GAMMA WWW pages or GAMMA specific images therein may be reproduced or used in any manner outside of personal Web Browsers without permission from the copyright holders.
Send problems & suggestions to gamma@magnet.fsu.edu
Last Modification Fri Oct 6 14:01:03 EDT 2000
Page Access Count Since October 7 1999: Cannot #EXEC '/cgi/counter.cgi/doc=demo1' due to lack of EXECUTE permission