PowerAda Example

From OC Systems Wiki!
< PowerAda:Getting Started
Revision as of 00:35, 25 April 2019 by imported>WikiVisor (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


This is a very simple example just to show you can run the compiler in your environment.

Assume that:

  • The program is:
with Text_Io;
procedure Test is
begin
Text_Io.Put_Line("PowerAda lives!");
end Test;
  • This program resides in a text file named test.ada.
  • The PowerAda compiler has been installed.
  • The POWERADA environment variable is defined and $POWERADA/bin is included in the definition of the PATH variable. See "Setting up a User Account to Use Ada" for more on how to do this.

To initialize your working sublibrary, compile and link your program, and run the executable, enter the following commands:

$ ada -m test.ada
$ ./a.out
Hello world!
a.out - executable file
alib.list - library list file
adalib - Ada sublibrary

This is how the compiler works from the command line, outside a project. Before you really start using PowerAda, you should read Chapter 3, "Basic PowerAda Concepts", and at least try the Getting Started Demo in Appendix D, "Demos and Tutorials".