![]() |
|
![]() |
| B2C | C2B | Cap | |
| ODD | OVRCap | OVRODD | OVRODD |
| OVRODD | OVRODD | OVRTRUNC | OVRTRUNC |
| OVRTRUNC | OVRTRUNC | OVRTRUNC | OVRTRUNC |
| OVRTRUNC | TRUNC |
Null_Address : constant := null;
NullString : constant string := ASCIIX.nul
& ASCIIX.nul;
--|
--| Standard object types
--|
type S_Integer is range - 2_147_483_648 .. 2_147_483_647;
for S_Integer'size use 32;
type S_Integer8 is new Byte_Integer range Byte_Integer'first .. Byte_Integer'last;
type S_Integer16 is new Word_Integer range Word_Integer'first .. Word_Integer'last;
type S_Integer32 is range - 2_147_483_648 .. 2_147_483_647;
for S_Integer32'size use 32;
type S_Natural is range 0 .. 2_147_483_647;
for S_Natural'size use 32;
type S_Natural8 is new Byte_Integer range 0 .. Byte_Integer'last;
type S_Natural16 is new Word_Integer range 0 .. Word_Integer'last;
type S_Natural32 is range 0 .. 2_147_483_647;
for S_Natural32'size use 32;
type S_Positive is range 1 .. 2_147_483_647;
for S_Positive'size use 32;
type S_Positive8 is new Byte_Integer range 1 .. Byte_Integer'last;
type S_Positive16 is new Word_Integer range 1 .. Word_Integer'last;
type S_Positive32 is range 1 .. 2_147_483_647;
for S_Positive32'size use 32;
type S_Float is new float;
type S_Float32 is new float;
type S_Float64 is new Long_Float;
type S_FilePosition is record
LoDWord : Unsigned.DWORD;
HiDWord : Unsigned.DWORD;
end record;
for S_FilePosition'size use 64;
--|
--| Standard unconstrained arrays
--|
type Byte_U_Array is array (S_Integer range <>) of Unsigned.BYTE;
type Word_U_Array is array (S_Integer range <>) of Unsigned.WORD;
type DWORD_u_array is array (S_Integer range <>) of Unsigned.DWORD;
type Boolean_U_Array is array (S_Integer range <>) of boolean;
type Natural_U_Array is array (S_Integer range <>) of S_Natural;
type Natural8_U_Array is array (S_Integer range <>) of S_Natural8;
type Natural16_U_Array is array (S_Integer range <>) of S_Natural16;
type Natural32_U_Array is array (S_Integer range <>) of S_Natural32;
type Integer_U_Array is array (S_Integer range <>) of S_Integer;
type Integer8_U_Array is array (S_Integer range <>) of S_Integer8;
type Integer16_U_Array is array (S_Integer range <>) of S_Integer16;
type Integer32_U_Array is array (S_Integer range <>) of S_Integer32;
type Positive_U_Array is array (S_Integer range <>) of S_Positive;
type Positive8_U_Array is array (S_Integer range <>) of S_Positive8;
type Positive16_U_Array is array (S_Integer range <>) of S_Positive16;
type Positive32_U_Array is array (S_Integer range <>) of S_Positive32;
type Float32_U_Array is array (S_Integer range <>) of S_Float32;
type Float64_U_Array is array (S_Integer range <>) of S_Float64;
type Float_U_Array is array (S_Integer range <>) of S_Float;
--|
--| Access to standard unconstrained arrays
--|
type Byte_u_access is access Byte_U_Array;
type Word_U_Access is access Word_U_Array;
type Boolean_U_Access is access Boolean_U_Array;
type String_U_Access is access string;
type Natural_U_Access is access Natural_U_Array;
type Natural8_U_Access is access Natural8_U_Array;
type Natural16_U_Access is access Natural16_U_Array;
type Natural32_U_Access is access Natural32_U_Array;
type Integer_U_Access is access Integer_U_Array;
type Integer8_U_Access is access Integer8_U_Array;
type Integer16_U_Access is access Integer16_U_Array;
type Integer32_U_Access is access Integer32_U_Array;
type Positive_U_Access is access Positive_U_Array;
type Positive8_U_Access is access Positive8_U_Array;
type Positive16_U_Access is access Positive16_U_Array;
type Positive32_U_Access is access Positive32_U_Array;
type Float32_U_Access is access Float32_U_Array;
type Float64_U_Access is access Float64_U_Array;
type Float_U_Access is access Float_U_Array;
--|
--| Standard sizes
--|
Address_Size : constant := 32;
Access_size : constant := 32;
Boolean_Size : constant := boolean'size;
Byte_Size : constant := Unsigned.BYTE'size;
Word_Size : constant := Unsigned.WORD'size;
S_Natural8_Size : constant := S_Natural8'size;
S_Natural16_Size : constant := S_Natural16'size;
S_Natural32_size : constant := S_Natural32'size;
S_Natural_Size : constant := S_Natural'size;
S_Integer8_Size : constant := S_Integer8'size;
S_Integer16_size : constant := S_Integer16'size;
S_Integer32_size : constant := S_Integer32'size;
S_Integer_Size : constant := S_Integer'size;
S_Positive8_Size : constant := S_Positive8'size;
S_Positive16_Size : constant := S_Positive16'size;
S_Positive32_Size : constant := S_Positive32'size;
S_Positive_Size : constant := S_Positive'size;
S_Float32_Size : constant := S_Float32'size;
S_Float64_Size : constant := S_Float64'size;
S_Float_Size : constant := S_Float32'size;
S_FilePosition_Size : constant := S_FilePosition'size;
--|
--| Procedures to free standard access types
--|
procedure Free_Byteaccess is new
Unchecked_Deallocation
(Byte_U_Array,
Byte_u_access);
procedure Free_wordAccess is new
Unchecked_Deallocation
(Word_U_Array,
Word_U_Access);
procedure Free_booleanAccess is new
Unchecked_Deallocation
(Boolean_U_Array,
Boolean_U_Access);
procedure Free_stringAccess is new
Unchecked_Deallocation
(string,
String_U_Access);
procedure Free_NaturalAccess is new
Unchecked_Deallocation
(Natural_U_Array,
Natural_U_Access);
procedure Free_Natural8Access is new
Unchecked_Deallocation
(Natural8_U_Array,
Natural8_U_Access);
procedure Free_Natural16Access is new
Unchecked_Deallocation
(Natural16_U_Array,
Natural16_U_Access);
procedure Free_Natural32Access is new
Unchecked_Deallocation
(Natural32_U_Array,
Natural32_U_Access);
procedure Free_integerAccess is new
Unchecked_Deallocation
(Integer_U_Array,
Integer_U_Access);
procedure Free_integer8Access is new
Unchecked_Deallocation
(Integer8_U_Array,
Integer8_U_Access);
procedure Free_integer16Access is new
Unchecked_Deallocation
(Integer16_U_Array,
Integer16_U_Access);
procedure Free_Integer32Access is new
Unchecked_Deallocation
(Integer32_U_Array,
Integer32_U_Access);
procedure Free_PositiveAccess is new
Unchecked_Deallocation
(Positive_U_Array,
Positive_U_Access);
procedure Free_Positive8Access is new
Unchecked_Deallocation
(Positive8_U_Array,
Positive8_U_Access);
procedure Free_Positive16Access is new
Unchecked_Deallocation
(Positive16_U_Array,
Positive16_U_Access);
procedure Free_Positive32Access is new
Unchecked_Deallocation
(Positive32_U_Array,
Positive32_U_Access);
procedure Free_Float32Access is new
Unchecked_Deallocation
(Float32_U_Array,
Float32_U_Access);
procedure Free_Float64Access is new
Unchecked_Deallocation
(Float64_U_Array,
Float64_U_Access);
procedure Free_FloatAccess is new
Unchecked_Deallocation
(Float_U_Array,
Float_U_Access);
type HandleState is (HandleClosed,
HandleOpen);
function B2C
(bValue : in Unsigned.BYTE) return character;
--*
-- B2C - Convert a byte value to a character.
--
--
-- This procedure converts a byte into a character type.
--
-- CALLING SEQUENCE -
--
-- c := B2C (bValue)
--
-- ENTRY -
--
-- bValue : unsigned.byte
-- Byte value to convert.
--
-- EXIT -
--
-- c : character
-- Converted byte.
--
function C2B
(cValue : in character) return Unsigned.BYTE;
--*
-- C2B - Convert a character to a byte value.
--
--
-- This procedure converts a character to a byte.
--
-- CALLING SEQUENCE -
--
-- b := C2B (cValue)
--
-- ENTRY -
--
-- cValue : character
-- Character to convert to a byte.
--
-- EXIT -
--
-- b : unsigned.byte
-- Converted character in byte form.
--
function Cap
(TheChar : in character) return character;
--*
-- CAP - Capitalize a character.
--
--
-- This procedure returns the upper case form of a character.
--
-- CALLING SEQUENCE -
--
-- ch := CAP (TheChar)
--
-- ENTRY -
--
-- TheChar : character
-- Character to be capitalized.
--
-- EXIT -
--
-- ch : character
-- The capitalized character.
--
function Cap
(TheByte : in Unsigned.BYTE) return Unsigned.BYTE;
--*
-- CAP - Change a byte representing a character to the upper case equivalent.
--
--
-- This procedure returns the upper case form of a byte value.
--
-- CALLING SEQUENCE -
--
-- ch := CAP (TheByte)
--
-- ENTRY -
--
-- TheByte : Unsigned.Byte
-- Byte value representing a character to be capitalized.
--
-- EXIT -
--
-- Ch : Unsigned.Byte
-- The capitalized equivalent of the byte.
--
function ODD
(Number : in integer) return boolean;
--*
-- Odd - Determine if an integer is odd.
--
--
-- This procedure returns the odd/even status of an integer.
--
-- CALLING SEQUENCE -
--
-- b := Odd (i)
--
-- ENTRY -
--
-- Number : Integer
-- Integer whose status is to be determined.
--
-- EXIT -
--
-- boolean
-- The integer is Odd (TRUE) or even (FALSE).
--
function ODD
(Number : in S_Integer) return boolean;
--*
-- Odd - Base Odd routine overloaded to handle S_Integer.
--
--
-- See spec above for more details.
--
function ODD
(Number : in S_Integer32) return boolean;
--*
-- Odd - Base Odd routine overloaded to handle S_Integer32.
--
--
-- See spec above for more details.
--
function ODD
(Number : in S_Natural) return boolean;
--*
-- Odd - Base Odd routine overloaded to handle S_Natural.
--
--
-- See spec above for more details.
--
function ODD
(Number : in S_Natural32) return boolean;
--*
-- Odd - Base Odd routine overloaded to handle S_Natural32.
--
--
-- See spec above for more details.
--
function TRUNC
(Flt : in float) return integer;
--*
-- Trunc - Truncate a floating point number to its integer value.
--
--
-- This procedure returns the truncated (whole number) portion of a
-- floating point number.
--
-- CALLING SEQUENCE -
--
-- Int := Trunc (Flt)
--
-- ENTRY -
--
-- Flt : Float
-- Floating point number to be truncated
--
-- EXIT -
--
-- Integer
-- Truncated (whole number) portion of the floating point number
--
function TRUNC
(Flt : in S_Float32) return integer;
--*
-- Trunc - Base Trunc routine overloaded to handle S_Float32.
--
--
function TRUNC
(Flt : in S_Float64) return integer;
--*
-- Trunc - Base Trunc routine overloaded to handle S_Float64.
--
--
function TRUNC
(Flt : in S_Float) return integer;
--*
-- Trunc - Base Trunc routine overloaded to handle S_Float.
--
--
function TRUNC
(Flt : in float) return S_Integer;
--*
-- Trunc - Base Trunc routine overloaded to return S_Integer.
--
function TRUNC
(Flt : in S_Float32) return S_Integer;
--*
-- Trunc - Base Trunc routine overloaded to return S_Integer.
--
--
function TRUNC
(Flt : in S_Float64) return S_Integer;
--*
-- Trunc - Base Trunc routine overloaded to return S_Integer.
--
--
function TRUNC
(Flt : in S_Float) return S_Integer;
--*
-- Trunc - Base Trunc routine overloaded to return S_Integer.
--
--
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance