This is an appendix to
Programming written for people interested in Ada programming on POSIX
The first program shows the basic logic of a curses program: hello1.adb.
Compiling and running the program is easy:
% gnatmake -P hello1 % ./hello1
[...] Predict the output of this second example: hello2.adb.
Note that neither
direct equivalents in POSIX/Ada. To make the functioning of the examples
more obvious I have made
function Alarm and
Pause available in
[...] We combine these ideas to write the program sleep1.adb.
In Ada the
delay statement does the job of
sleep() and the
The program ticker_demo.adb demonstrates the use of an interval timer.
Compile and run sigdemo3.adb to learn how processes on your system respond to combinations of signals.
Procedure Send_Signal in
package POSIX.Signals sends a signal to a
Skip this. It is strictly for single threaded programs.
You can of course use
statements also for fine-grained pauses, so there is no need to look
[...] (Hint: Read the section
Delay Statements, Duration, and
Time in the Ada Reference Manual.)
Go to next chapter.
Understanding Unix/Linux Programming, Bruce Molay, ISBN 0-13-008396-8.