DEVELOPMENT EDITION · 769442725406
Library Reference
On this page

GNAT.OS_Lib

The part of GNAT.OS_Lib that Verada provides: OS_Exit ends the whole program with a status, declared with the Program_Exit aspect.

Read the family guide for representation, selection and resource rules. The complete declaration page retains exact signatures/contracts; the source specification is the implementation baseline.

Availability and ownership

OS_Exit has Program_Exit and Exit_Cases => (others => Program_Exit): a caller may call it only where it may exit the program itself, and the caller's Program_Exit condition must hold there (B5120). The program's output, captured by veradic run or not, is written out before it ends.

Import and instantiate

with GNAT.OS_Lib;
...
GNAT.OS_Lib.OS_Exit (3);

API 001

OS_Exit (declaration) — Ends the whole program with this status.

Declared interface:

procedure OS_Exit (Status : Integer)
  with Import, Convention => Ada, External_Name => "verada_rt_os_exit",
       Global => null,
       Program_Exit,
       Exit_Cases => (others => Program_Exit),
       Post => False;