[[:Template:BOOKNAME]]/Libraries/Ada.Containers.Unbounded_Synchronized_Queues
This is the print version of Ada Libraries You won't see this message or any elements not part of the book's content when you print or preview this page. |
The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/Ada_Libraries
Ada Programming/Libraries/Ada.Assertions
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Assertions is a unit of the Predefined Language Environment since Ada 2005.
The Assert procedures in this package raise the Assertion_Error exception if the Check parameter is False.
This is the same behavior as the pragma Assert when the pragma Assertion_Policy is Check. In fact, you could think of pragma Assert as a call to this package, conditioned to the value of the pragma Assertion_Policy.
Example
[edit | edit source]This will raise Assertion_Error with the provided message.
with Ada.Assertions;
procedure Failing_Assertion is
begin
Ada.Assertions.Assert (0 in Positive, "0 is not in the positive range");
end Failing_Assertion;
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.AssertionsispragmaPure (Assertions); Assertion_Error :exception;procedureAssert (Check :inBoolean);procedureAssert (Check :inBoolean; Message :inString);endAda.Assertions;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-assert.ads
- Body: a-assert.adb
drake
- Specification: a-assert.ads
- Body: a-assert.adb
Ada Programming/Libraries/Ada.Asynchronous Task Control
[edit | edit source]This language feature is available from Ada 95 on.
Ada.Asynchronous_Task_Control is a unit of the Predefined Language Environment since Ada 95.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Task_Identification;packageAda.Asynchronous_Task_ControlispragmaPreelaborate (Asynchronous_Task_Control);procedureHold (T :inAda.Task_Identification.Task_Id);procedureContinue (T :inAda.Task_Identification.Task_Id);functionIs_Held (T :inAda.Task_Identification.Task_Id)returnBoolean;endAda.Asynchronous_Task_Control;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 95
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-astaco.ads
- Body: a-astaco.adb
drake
- Specification: tasking/a-astaco.ads
Ada Programming/Libraries/Ada.Calendar
[edit | edit source]This language feature is available from Ada 95 on.
Ada.Calendar is a unit of the Predefined Language Environment since Ada 95.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.CalendaristypeTimeisprivate;subtypeYear_NumberisIntegerrange1901 .. 2399;subtypeMonth_NumberisIntegerrange1 .. 12;subtypeDay_NumberisIntegerrange1 .. 31;subtypeDay_DurationisDurationrange0.0 .. 86_400.0;functionClockreturnTime;functionYear (Date : Time)returnYear_Number;functionMonth (Date : Time)returnMonth_Number;functionDay (Date : Time)returnDay_Number;functionSeconds(Date : Time)returnDay_Duration;procedureSplit (Date :inTime; Year :outYear_Number; Month :outMonth_Number; Day :outDay_Number; Seconds :outDay_Duration);functionTime_Of(Year : Year_Number; Month : Month_Number; Day : Day_Number; Seconds : Day_Duration := 0.0)returnTime;function"+" (Left : Time; Right : Duration)returnTime;function"+" (Left : Duration; Right : Time)returnTime;function"-" (Left : Time; Right : Duration)returnTime;function"-" (Left : Time; Right : Time)returnDuration;function"<" (Left, Right : Time)returnBoolean;function"<="(Left, Right : Time)returnBoolean;function">" (Left, Right : Time)returnBoolean;function">="(Left, Right : Time)returnBoolean; Time_Error :exception;privatepragmaImport (Ada, Time);endAda.Calendar;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 95
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-calend.ads
- Body: a-calend.adb
drake
- Specification: calendar/a-calend.ads
- Body: calendar/a-calend.adb
Ada Programming/Libraries/Ada.Calendar.Arithmetic
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Calendar.Arithmetic is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.Calendar.Arithmeticis-- Arithmetic on days:typeDay_Countisrange-366 * (1 + Year_Number'Last - Year_Number'First) .. 366 * (1 + Year_Number'Last - Year_Number'First);subtypeLeap_Seconds_CountisIntegerrange-2047 .. 2047;procedureDifference (Left :inTime; Right :inTime; Days :outDay_Count; Seconds :outDuration; Leap_Seconds :outLeap_Seconds_Count);function"+" (Left :inTime; Right :inDay_Count)returnTime;function"+" (Left :inDay_Count; Right :inTime)returnTime;function"-" (Left :inTime; Right :inDay_Count)returnTime;function"-" (Left :inTime; Right :inTime)returnDay_Count;endAda.Calendar.Arithmetic;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-calari.ads
- Body: a-calari.adb
drake
- Specification: calendar/a-calari.ads
- Body: calendar/a-calari.adb
Ada Programming/Libraries/Ada.Calendar.Formatting
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Calendar.Formatting is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Calendar.Time_Zones;packageAda.Calendar.Formattingis-- Day of the week:typeDay_Nameis(Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday);functionDay_of_Week (Date :inTime)returnDay_Name; -- Hours:Minutes:Seconds access:subtypeHour_NumberisNaturalrange0 .. 23;subtypeMinute_NumberisNaturalrange0 .. 59;subtypeSecond_NumberisNaturalrange0 .. 59;subtypeSecond_DurationisDay_Durationrange0.0 .. 1.0;functionYear (Date :inTime; Time_Zone :inTime_Zones.Time_Offset := 0)returnYear_Number;functionMonth (Date :inTime; Time_Zone :inTime_Zones.Time_Offset := 0)returnMonth_Number;functionDay (Date :inTime; Time_Zone :inTime_Zones.Time_Offset := 0)returnDay_Number;functionHour (Date :inTime; Time_Zone :inTime_Zones.Time_Offset := 0)returnHour_Number;functionMinute (Date :inTime; Time_Zone :inTime_Zones.Time_Offset := 0)returnMinute_Number;functionSecond (Date :inTime)returnSecond_Number;functionSub_Second (Date :inTime)returnSecond_Duration;functionSeconds_Of (Hour :inHour_Number; Minute :inMinute_Number; Second :inSecond_Number := 0; Sub_Second :inSecond_Duration := 0.0)returnDay_Duration;procedureSplit (Seconds :inDay_Duration; Hour :outHour_Number; Minute :outMinute_Number; Second :outSecond_Number; Sub_Second :outSecond_Duration);functionTime_Of (Year :inYear_Number; Month :inMonth_Number; Day :inDay_Number; Hour :inHour_Number; Minute :inMinute_Number; Second :inSecond_Number; Sub_Second :inSecond_Duration := 0.0; Leap_Second :inBoolean := False; Time_Zone :inTime_Zones.Time_Offset := 0)returnTime;functionTime_Of (Year :inYear_Number; Month :inMonth_Number; Day :inDay_Number; Seconds :inDay_Duration := 0.0; Leap_Second :inBoolean := False; Time_Zone :inTime_Zones.Time_Offset := 0)returnTime;procedureSplit (Date :inTime; Year :outYear_Number; Month :outMonth_Number; Day :outDay_Number; Hour :outHour_Number; Minute :outMinute_Number; Second :outSecond_Number; Sub_Second :outSecond_Duration; Time_Zone :inTime_Zones.Time_Offset := 0);procedureSplit (Date :inTime; Year :outYear_Number; Month :outMonth_Number; Day :outDay_Number; Hour :outHour_Number; Minute :outMinute_Number; Second :outSecond_Number; Sub_Second :outSecond_Duration; Leap_Second :outBoolean; Time_Zone :inTime_Zones.Time_Offset := 0);procedureSplit (Date :inTime; Year :outYear_Number; Month :outMonth_Number; Day :outDay_Number; Seconds :outDay_Duration; Leap_Second :outBoolean; Time_Zone :inTime_Zones.Time_Offset := 0); -- Simple image and value:functionImage (Date :inTime; Include_Time_Fraction :inBoolean := False; Time_Zone :inTime_Zones.Time_Offset := 0)returnString;functionValue (Date :inString; Time_Zone :inTime_Zones.Time_Offset := 0)returnTime;functionImage (Elapsed_Time :inDuration; Include_Time_Fraction :inBoolean := False)returnString;functionValue (Elapsed_Time :inString)returnDuration;endAda.Calendar.Formatting;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-calfor.ads
- Body: a-calfor.adb
drake
- Specification: calendar/a-calfor.ads
- Body: calendar/a-calfor.adb
Ada Programming/Libraries/Ada.Calendar.Time Zones
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Calendar.Time_Zones is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.Calendar.Time_Zonesis-- Time zone manipulation:typeTime_Offsetisrange-28 * 60 .. 28 * 60; Unknown_Zone_Error :exception;functionUTC_Time_Offset (Date :inTime := Clock)returnTime_Offset;endAda.Calendar.Time_Zones;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-catizo.ads
- Body: a-catizo.adb
drake
- Specification: calendar/a-catizo.ads
- Body: calendar/a-catizo.adb
Ada Programming/Libraries/Ada.Characters
[edit | edit source]This language feature is available from Ada 95 on.
Ada.Characters is a unit of the Predefined Language Environment since Ada 95.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.CharactersispragmaPure (Characters);endAda.Characters;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 95
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-charac.ads
drake
- Specification: strings/a-charac.ads
Ada Programming/Libraries/Ada.Characters.Conversions
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Characters.Conversions is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.Characters.ConversionsispragmaPure (Conversions);functionIs_Character (Item :inWide_Character)returnBoolean;functionIs_String (Item :inWide_String)returnBoolean;functionIs_Character (Item :inWide_Wide_Character)returnBoolean;functionIs_String (Item :inWide_Wide_String)returnBoolean;functionIs_Wide_Character (Item :inWide_Wide_Character)returnBoolean;functionIs_Wide_String (Item :inWide_Wide_String)returnBoolean;functionTo_Wide_Character (Item :inCharacter)returnWide_Character;functionTo_Wide_String (Item :inString)returnWide_String;functionTo_Wide_Wide_Character (Item :inCharacter)returnWide_Wide_Character;functionTo_Wide_Wide_String (Item :inString)returnWide_Wide_String;functionTo_Wide_Wide_Character (Item :inWide_Character)returnWide_Wide_Character;functionTo_Wide_Wide_String (Item :inWide_String)returnWide_Wide_String;functionTo_Character (Item :inWide_Character; Substitute :inCharacter := ' ')returnCharacter;functionTo_String (Item :inWide_String; Substitute :inCharacter := ' ')returnString;functionTo_Character (Item :inWide_Wide_Character; Substitute :inCharacter := ' ')returnCharacter;functionTo_String (Item :inWide_Wide_String; Substitute :inCharacter := ' ')returnString;functionTo_Wide_Character (Item :inWide_Wide_Character; Substitute :inWide_Character := ' ')returnWide_Character;functionTo_Wide_String (Item :inWide_Wide_String; Substitute :inWide_Character := ' ')returnWide_String;endAda.Characters.Conversions;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]
Ada Programming/Libraries/Ada.Characters.Handling
[edit | edit source]This language feature is available from Ada 95 on.
Ada.Characters.Handling is a unit of the Predefined Language Environment since Ada 95.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Characters.Conversions;packageAda.Characters.HandlingispragmaPure (Handling); -- Character classification functionsfunctionIs_Control (Item :inCharacter)returnBoolean;functionIs_Graphic (Item :inCharacter)returnBoolean;functionIs_Letter (Item :inCharacter)returnBoolean;functionIs_Lower (Item :inCharacter)returnBoolean;functionIs_Upper (Item :inCharacter)returnBoolean;functionIs_Basic (Item :inCharacter)returnBoolean;functionIs_Digit (Item :inCharacter)returnBoolean;functionIs_Decimal_Digit (Item :inCharacter)returnBooleanrenamesIs_Digit;functionIs_Hexadecimal_Digit (Item :inCharacter)returnBoolean;functionIs_Alphanumeric (Item :inCharacter)returnBoolean;functionIs_Special (Item :inCharacter)returnBoolean; -- Conversion functions for Character and StringfunctionTo_Lower (Item :inCharacter)returnCharacter;functionTo_Upper (Item :inCharacter)returnCharacter;functionTo_Basic (Item :inCharacter)returnCharacter;functionTo_Lower (Item :inString)returnString;functionTo_Upper (Item :inString)returnString;functionTo_Basic (Item :inString)returnString; -- Classifications of and conversions between Character and ISO 646subtypeISO_646isCharacterrangeCharacter'Val(0) .. Character'Val(127);functionIs_ISO_646 (Item :inCharacter)returnBoolean;functionIs_ISO_646 (Item :inString)returnBoolean;functionTo_ISO_646 (Item :inCharacter; Substitute :inISO_646 := ' ')returnISO_646;functionTo_ISO_646 (Item :inString; Substitute :inISO_646 := ' ')returnString; -- The functions Is_Character, Is_String, To_Character, To_String, -- To_Wide_Character and To_Wide_String are obsolescent; see J.14.functionIs_Character (Item :inWide_Character)returnBooleanrenamesConversions.Is_Character;functionIs_String (Item :inWide_String)returnBooleanrenamesConversions.Is_String;functionTo_Character (Item :inWide_Character; Substitute :inCharacter := ' ')returnCharacterrenamesConversions.To_Character;functionTo_String (Item :inWide_String; Substitute :inCharacter := ' ')returnStringrenamesConversions.To_String;functionTo_Wide_Character (Item :inCharacter)returnWide_CharacterrenamesConversions.To_Wide_Character;functionTo_Wide_String (Item :inString)returnWide_StringrenamesConversions.To_Wide_String;endAda.Characters.Handling;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 95
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]
Ada Programming/Libraries/Ada.Characters.Latin 1
[edit | edit source]This language feature is available from Ada 95 on.
Ada.Characters.Latin_1 is a unit of the Predefined Language Environment since Ada 95.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.Characters.Latin_1ispragmaPure (Latin_1); -- Control characters: NUL :constantCharacter := Character'Val(0); SOH :constantCharacter := Character'Val(1); STX :constantCharacter := Character'Val(2); ETX :constantCharacter := Character'Val(3); EOT :constantCharacter := Character'Val(4); ENQ :constantCharacter := Character'Val(5); ACK :constantCharacter := Character'Val(6); BEL :constantCharacter := Character'Val(7); BS :constantCharacter := Character'Val(8); HT :constantCharacter := Character'Val(9); LF :constantCharacter := Character'Val(10); VT :constantCharacter := Character'Val(11); FF :constantCharacter := Character'Val(12); CR :constantCharacter := Character'Val(13); SO :constantCharacter := Character'Val(14); SI :constantCharacter := Character'Val(15); DLE :constantCharacter := Character'Val(16); DC1 :constantCharacter := Character'Val(17); DC2 :constantCharacter := Character'Val(18); DC3 :constantCharacter := Character'Val(19); DC4 :constantCharacter := Character'Val(20); NAK :constantCharacter := Character'Val(21); SYN :constantCharacter := Character'Val(22); ETB :constantCharacter := Character'Val(23); CAN :constantCharacter := Character'Val(24); EM :constantCharacter := Character'Val(25); SUB :constantCharacter := Character'Val(26); ESC :constantCharacter := Character'Val(27); FS :constantCharacter := Character'Val(28); GS :constantCharacter := Character'Val(29); RS :constantCharacter := Character'Val(30); US :constantCharacter := Character'Val(31); -- ISO 646 graphic characters: Space :constantCharacter := ' '; -- Character'Val(32) Exclamation :constantCharacter := '|'; -- Character'Val(33) Quotation :constantCharacter := '"'; -- Character'Val(34) Number_Sign :constantCharacter := '#'; -- Character'Val(35) Dollar_Sign :constantCharacter := '$'; -- Character'Val(36) Percent_Sign :constantCharacter := '%'; -- Character'Val(37) Ampersand :constantCharacter := '&'; -- Character'Val(38) Apostrophe :constantCharacter := '''; -- Character'Val(39) Left_Parenthesis :constantCharacter := '('; -- Character'Val(40) Right_Parenthesis :constantCharacter := ')'; -- Character'Val(41) Asterisk :constantCharacter := '*'; -- Character'Val(42) Plus_Sign :constantCharacter := '+'; -- Character'Val(43) Comma :constantCharacter := ','; -- Character'Val(44) Hyphen :constantCharacter := '-'; -- Character'Val(45) Minus_Sign : CharacterrenamesHyphen; Full_Stop :constantCharacter := '.'; -- Character'Val(46) Solidus :constantCharacter := '/'; -- Character'Val(47) -- Decimal digits '0' though '9' are at positions 48 through 57 Colon :constantCharacter := ':'; -- Character'Val(58) Semicolon :constantCharacter := ';'; -- Character'Val(59) Less_Than_Sign :constantCharacter := '<'; -- Character'Val(60) Equals_Sign :constantCharacter := '='; -- Character'Val(61) Greater_Than_Sign :constantCharacter := '>'; -- Character'Val(62) Question :constantCharacter := '?'; -- Character'Val(63) Commercial_At :constantCharacter := '@'; -- Character'Val(64) -- Letters 'A' through 'Z' are at positions 65 through 90 Left_Square_Bracket :constantCharacter := '['; -- Character'Val(91) Reverse_Solidus :constantCharacter := '\'; -- Character'Val(92) Right_Square_Bracket :constantCharacter := ']'; -- Character'Val(93) Circumflex :constantCharacter := '^'; -- Character'Val(94) Low_Line :constantCharacter := '_'; -- Character'Val(95) Grave :constantCharacter := '`'; -- Character'Val(96) LC_A :constantCharacter := 'a'; -- Character'Val(97) LC_B :constantCharacter := 'b'; -- Character'Val(98) LC_C :constantCharacter := 'c'; -- Character'Val(99) LC_D :constantCharacter := 'd'; -- Character'Val(100) LC_E :constantCharacter := 'e'; -- Character'Val(101) LC_F :constantCharacter := 'f'; -- Character'Val(102) LC_G :constantCharacter := 'g'; -- Character'Val(103) LC_H :constantCharacter := 'h'; -- Character'Val(104) LC_I :constantCharacter := 'i'; -- Character'Val(105) LC_J :constantCharacter := 'j'; -- Character'Val(106) LC_K :constantCharacter := 'k'; -- Character'Val(107) LC_L :constantCharacter := 'l'; -- Character'Val(108) LC_M :constantCharacter := 'm'; -- Character'Val(109) LC_N :constantCharacter := 'n'; -- Character'Val(110) LC_O :constantCharacter := 'o'; -- Character'Val(111) LC_P :constantCharacter := 'p'; -- Character'Val(112) LC_Q :constantCharacter := 'q'; -- Character'Val(113) LC_R :constantCharacter := 'r'; -- Character'Val(114) LC_S :constantCharacter := 's'; -- Character'Val(115) LC_T :constantCharacter := 't'; -- Character'Val(116) LC_U :constantCharacter := 'u'; -- Character'Val(117) LC_V :constantCharacter := 'v'; -- Character'Val(118) LC_W :constantCharacter := 'w'; -- Character'Val(119) LC_X :constantCharacter := 'x'; -- Character'Val(120) LC_Y :constantCharacter := 'y'; -- Character'Val(121) LC_Z :constantCharacter := 'z'; -- Character'Val(122) Left_Curly_Bracket :constantCharacter := '{'; -- Character'Val(123) Vertical_Line :constantCharacter := '|'; -- Character'Val(124) Right_Curly_Bracket :constantCharacter := '}'; -- Character'Val(125) Tilde :constantCharacter := '~'; -- Character'Val(126) DEL :constantCharacter := Character'Val(127); -- ISO 6429 control characters: IS4 : CharacterrenamesFS; IS3 : CharacterrenamesGS; IS2 : CharacterrenamesRS; IS1 : CharacterrenamesUS; Reserved_128 :constantCharacter := Character'Val(128); Reserved_129 :constantCharacter := Character'Val(129); BPH :constantCharacter := Character'Val(130); NBH :constantCharacter := Character'Val(131); Reserved_132 :constantCharacter := Character'Val(132); NEL :constantCharacter := Character'Val(133); SSA :constantCharacter := Character'Val(134); ESA :constantCharacter := Character'Val(135); HTS :constantCharacter := Character'Val(136); HTJ :constantCharacter := Character'Val(137); VTS :constantCharacter := Character'Val(138); PLD :constantCharacter := Character'Val(139); PLU :constantCharacter := Character'Val(140); RI :constantCharacter := Character'Val(141); SS2 :constantCharacter := Character'Val(142); SS3 :constantCharacter := Character'Val(143); DCS :constantCharacter := Character'Val(144); PU1 :constantCharacter := Character'Val(145); PU2 :constantCharacter := Character'Val(146); STS :constantCharacter := Character'Val(147); CCH :constantCharacter := Character'Val(148); MW :constantCharacter := Character'Val(149); SPA :constantCharacter := Character'Val(150); EPA :constantCharacter := Character'Val(151); SOS :constantCharacter := Character'Val(152); Reserved_153 :constantCharacter := Character'Val(153); SCI :constantCharacter := Character'Val(154); CSI :constantCharacter := Character'Val(155); ST :constantCharacter := Character'Val(156); OSC :constantCharacter := Character'Val(157); PM :constantCharacter := Character'Val(158); APC :constantCharacter := Character'Val(159); -- Other graphic characters: -- Character positions 160 (16#A0#) .. 175 (16#AF#): No_Break_Space :constantCharacter := ' '; -- Character'Val(160) NBSP : CharacterrenamesNo_Break_Space; Inverted_Exclamation :constantCharacter := '¡'; -- Character'Val(161) Cent_Sign :constantCharacter := '¢'; -- Character'Val(162) Pound_Sign :constantCharacter := '£'; -- Character'Val(163) Currency_Sign :constantCharacter := '¤'; -- Character'Val(164) Yen_Sign :constantCharacter := '¥'; -- Character'Val(165) Broken_Bar :constantCharacter := '¦'; -- Character'Val(166) Section_Sign :constantCharacter := '§'; -- Character'Val(167) Diaeresis :constantCharacter := '¨'; -- Character'Val(168) Copyright_Sign :constantCharacter := '©'; -- Character'Val(169) Feminine_Ordinal_Indicator :constantCharacter := 'ª'; -- Character'Val(170) Left_Angle_Quotation :constantCharacter := '«'; -- Character'Val(171) Not_Sign :constantCharacter := '¬'; -- Character'Val(172) Soft_Hyphen :constantCharacter := ''; -- Character'Val(173) Registered_Trade_Mark_Sign :constantCharacter := '®'; -- Character'Val(174) Macron :constantCharacter := '¯'; -- Character'Val(175) -- Character positions 176 (16#B0#) .. 191 (16#BF#): Degree_Sign :constantCharacter := '°'; -- Character'Val(176) Ring_Above : CharacterrenamesDegree_Sign; Plus_Minus_Sign :constantCharacter := '±'; -- Character'Val(177) Superscript_Two :constantCharacter := '²'; -- Character'Val(178) Superscript_Three :constantCharacter := '³'; -- Character'Val(179) Acute :constantCharacter := '´'; -- Character'Val(180) Micro_Sign :constantCharacter := 'µ'; -- Character'Val(181) Pilcrow_Sign :constantCharacter := '¶'; -- Character'Val(182) Paragraph_Sign : CharacterrenamesPilcrow_Sign; Middle_Dot :constantCharacter := '·'; -- Character'Val(183) Cedilla :constantCharacter := '¸'; -- Character'Val(184) Superscript_One :constantCharacter := '¹'; -- Character'Val(185) Masculine_Ordinal_Indicator :constantCharacter := 'º'; -- Character'Val(186) Right_Angle_Quotation :constantCharacter := '»'; -- Character'Val(187) Fraction_One_Quarter :constantCharacter := '¼'; -- Character'Val(188) Fraction_One_Half :constantCharacter := '½'; -- Character'Val(189) Fraction_Three_Quarters :constantCharacter := '¾'; -- Character'Val(190) Inverted_Question :constantCharacter := '¿'; -- Character'Val(191) -- Character positions 192 (16#C0#) .. 207 (16#CF#): UC_A_Grave :constantCharacter := 'À'; -- Character'Val(192) UC_A_Acute :constantCharacter := 'Á'; -- Character'Val(193) UC_A_Circumflex :constantCharacter := 'Â'; -- Character'Val(194) UC_A_Tilde :constantCharacter := 'Ã'; -- Character'Val(195) UC_A_Diaeresis :constantCharacter := 'Ä'; -- Character'Val(196) UC_A_Ring :constantCharacter := 'Å'; -- Character'Val(197) UC_AE_Diphthong :constantCharacter := 'Æ'; -- Character'Val(198) UC_C_Cedilla :constantCharacter := 'Ç'; -- Character'Val(199) UC_E_Grave :constantCharacter := 'È'; -- Character'Val(200) UC_E_Acute :constantCharacter := 'É'; -- Character'Val(201) UC_E_Circumflex :constantCharacter := 'Ê'; -- Character'Val(202) UC_E_Diaeresis :constantCharacter := 'Ë'; -- Character'Val(203) UC_I_Grave :constantCharacter := 'Ì'; -- Character'Val(204) UC_I_Acute :constantCharacter := 'Í'; -- Character'Val(205) UC_I_Circumflex :constantCharacter := 'Î'; -- Character'Val(206) UC_I_Diaeresis :constantCharacter := 'Ï'; -- Character'Val(207) -- Character positions 208 (16#D0#) .. 223 (16#DF#): UC_Icelandic_Eth :constantCharacter := 'Ð'; -- Character'Val(208) UC_N_Tilde :constantCharacter := 'Ñ'; -- Character'Val(209) UC_O_Grave :constantCharacter := 'Ò'; -- Character'Val(210) UC_O_Acute :constantCharacter := 'Ó'; -- Character'Val(211) UC_O_Circumflex :constantCharacter := 'Ô'; -- Character'Val(212) UC_O_Tilde :constantCharacter := 'Õ'; -- Character'Val(213) UC_O_Diaeresis :constantCharacter := 'Ö'; -- Character'Val(214) Multiplication_Sign :constantCharacter := '×'; -- Character'Val(215) UC_O_Oblique_Stroke :constantCharacter := 'Ø'; -- Character'Val(216) UC_U_Grave :constantCharacter := 'Ù'; -- Character'Val(217) UC_U_Acute :constantCharacter := 'Ú'; -- Character'Val(218) UC_U_Circumflex :constantCharacter := 'Û'; -- Character'Val(219) UC_U_Diaeresis :constantCharacter := 'Ü'; -- Character'Val(220) UC_Y_Acute :constantCharacter := 'Ý'; -- Character'Val(221) UC_Icelandic_Thorn :constantCharacter := 'Þ'; -- Character'Val(222) LC_German_Sharp_S :constantCharacter := 'ß'; -- Character'Val(223) -- Character positions 224 (16#E0#) .. 239 (16#EF#): LC_A_Grave :constantCharacter := 'à'; -- Character'Val(224) LC_A_Acute :constantCharacter := 'á'; -- Character'Val(225) LC_A_Circumflex :constantCharacter := 'â'; -- Character'Val(226) LC_A_Tilde :constantCharacter := 'ã'; -- Character'Val(227) LC_A_Diaeresis :constantCharacter := 'ä'; -- Character'Val(228) LC_A_Ring :constantCharacter := 'å'; -- Character'Val(229) LC_AE_Diphthong :constantCharacter := 'æ'; -- Character'Val(230) LC_C_Cedilla :constantCharacter := 'ç'; -- Character'Val(231) LC_E_Grave :constantCharacter := 'è'; -- Character'Val(232) LC_E_Acute :constantCharacter := 'é'; -- Character'Val(233) LC_E_Circumflex :constantCharacter := 'ê'; -- Character'Val(234) LC_E_Diaeresis :constantCharacter := 'ë'; -- Character'Val(235) LC_I_Grave :constantCharacter := 'ì'; -- Character'Val(236) LC_I_Acute :constantCharacter := 'í'; -- Character'Val(237) LC_I_Circumflex :constantCharacter := 'î'; -- Character'Val(238) LC_I_Diaeresis :constantCharacter := 'ï'; -- Character'Val(239) -- Character positions 240 (16#F0#) .. 255 (16#FF#): LC_Icelandic_Eth :constantCharacter := 'ð'; -- Character'Val(240) LC_N_Tilde :constantCharacter := 'ñ'; -- Character'Val(241) LC_O_Grave :constantCharacter := 'ò'; -- Character'Val(242) LC_O_Acute :constantCharacter := 'ó'; -- Character'Val(243) LC_O_Circumflex :constantCharacter := 'ô'; -- Character'Val(244) LC_O_Tilde :constantCharacter := 'õ'; -- Character'Val(245) LC_O_Diaeresis :constantCharacter := 'ö'; -- Character'Val(246) Division_Sign :constantCharacter := '÷'; -- Character'Val(247) LC_O_Oblique_Stroke :constantCharacter := 'ø'; -- Character'Val(248) LC_U_Grave :constantCharacter := 'ù'; -- Character'Val(249) LC_U_Acute :constantCharacter := 'ú'; -- Character'Val(250) LC_U_Circumflex :constantCharacter := 'û'; -- Character'Val(251) LC_U_Diaeresis :constantCharacter := 'ü'; -- Character'Val(252) LC_Y_Acute :constantCharacter := 'ý'; -- Character'Val(253) LC_Icelandic_Thorn :constantCharacter := 'þ'; -- Character'Val(254) LC_Y_Diaeresis :constantCharacter := 'ÿ'; -- Character'Val(255)endAda.Characters.Latin_1;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 95
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-chlat1.ads
drake
- Specification: strings/a-chlat1.ads
Ada Programming/Libraries/Ada.Command Line
[edit | edit source]This language feature is available from Ada 95 on.
Ada.Command_Line is a unit of the Predefined Language Environment since Ada 95.
Introduction
[edit | edit source]The Ada.Command_Line package enables the Ada program to access the command line arguments set by the command that invoked the program. It is the Ada version of the C argv and argc[n] system.
If the environment supports it, it is also possible to set the Ada program's exit status with Ada.Command_Line.
It is important to note, that all the code in this article is compiled and executed on a Slackware Linux system. The compiler used is GNATMAKE GPL 2008 (20080521) and the shell is BASH. This is important because the reference manual clearly states that:
If the external execution environment supports passing arguments to a program, then Argument_Count returns the number of arguments passed to the program invoking the function. Otherwise, it returns 0. The meaning of “number of arguments” is implementation defined.
Note the closing sentence: The meaning of “number of arguments” is implementation defined. What this means, is that you cannot trust a given argument string to yield the same result for all environments. Argument_Count is highly dependent on factors such as operating system, shell, and compiler.
Using Ada.Command_Line
[edit | edit source]The program we'll be using throughout this article doesn't actually do anything, except report the various arguments we've used when invoking the program. The basic program looks like this:
withAda.Text_IO;withAda.Command_Line;procedureArgsispackageIOrenamesAda.Text_IO;packageCLIrenamesAda.Command_Line;beginIO.Put_Line (Item => "Argument Count:" & CLI.Argument_Count'Img);endArgs;
When executing the above program with no arguments given, you should get the following output:
Argument Count: 0
Let's quickly go over the program: On lines 1 and 2 we add the Text_IO and Command_Line packages to the program. On lines 5 and 6 we rename those packages to the shorter IO and CLI and finally on line 8 we output the current argument count. And that is really all that is required to enable access to the command line arguments given to the program.
The full specification of the Command_Line package is about as simple as such specifications can be.
We've already encountered the Argument_Count function in the Args program, but lets see what happens when we invoke the Args program with some arguments.
Ada.Command_Line.Argument_Count
[edit | edit source]The specification for Argument_Count looks like this:
functionArgument_CountreturnNatural;
The basic Args program already use the Argument_Count function, so to see how it works, all we have to do is supply the program with a variety of arguments:
$ ./args --option=value Argument Count: 1 $ ./args --option=value --foo=bar Argument Count: 2 $ ./args --name=Thomas Løcke Argument Count: 2 $ ./args --option="Thomas Løcke" Argument Count: 1 $ ./args /path/to/file with spaces in name Argument Count: 5 $ ./args /path/to/file with spaces in name Argument Count: 1
A pattern should've emerged by now. Of particular interest is the last example: Because the whitespace is escaped, the entire string is treated as one argument. One could easily imagine that another environment might treat such an argument differently and perhaps ignore the backslash. The same holds for the double quotes example ("Thomas Løcke"). Other shells/environments might very well treat "Thomas Løcke" as two separate arguments because of the whitespace. The key thing is to be aware of such details when using Ada.Command_Line.
Ada.Command_Line.Argument
[edit | edit source]The specification for Argument looks like this:
functionArgument (Number : Positive)returnString;
Argument returns a String argument corresponding to the relative position Number. Note that Number is of type Positive. This means that the valid range of Number is 1 .. Argument_Count. If Number is outside this range, a Constraint_Error is raised.
To see how it works, we add 3 more lines to our small Args program:
foriin1 .. CLI.Argument_CountloopIO.Put_Line (Item => CLI.Argument (Number => i));endloop;
If we run Args with the same arguments as given in the Argument_Count example, we get these results:
$ ./args --option=value Argument Count: 1 1: --option=value $ ./args --option=value --foo=bar Argument Count: 2 1: --option=value 2: --foo=bar $ ./args --name=Thomas Løcke Argument Count: 2 1: --name=Thomas 2: Løcke $ ./args --option="Thomas Løcke" Argument Count: 1 1: --option=Thomas Løcke $ ./args /path/to/file with spaces in name Argument Count: 5 1: /path/to/file 2: with 3: spaces 4: in 5: name $ ./args /path/to/file with spaces in name Argument Count: 1 1: /path/to/file with spaces in name
There are no big surprises here.
If no arguments are given when running the program, you will end up with a null range loop: (1 .. 0). This is perfectly valid and the result is as expected: The loop is terminated immediately.
withAda.Text_IO;withAda.Command_Line;procedureArgsispackageIOrenamesAda.Text_IO;packageCLIrenamesAda.Command_Line;beginIO.Put_Line (Item => "Argument Count:" & CLI.Argument_Count'Img);foriin1 .. CLI.Argument_CountloopIO.Put (Item => i'Img & ": "); IO.Put_Line (Item => CLI.Argument (Number => i));endloop;endArgs;
Ada.Command_Line.Command_Name
[edit | edit source]The specification for Command_Name looks like this:
functionCommand_NamereturnString;
Command_Name returns the string command used to invoke the program. As is the case with Argument_Count, this is implementation-defined, so Command_Name might return X on system A, Y on system B and null on system C. You cannot rely on this value being the same across all combinations of compilers, shells, and operating systems.
To see how it works, add this line to the Args program:
IO.Put_Line (CLI.Command_Name);
If we execute the program, without any arguments, from within GNAT Studio (using Shift+F2), the result will be this:
Argument Count: 0 /home/thomas/wiki_examples/Args/args
Notice how GNAT Studio uses the full path to the Args program to invoke it.
If I change directory to /home/thomas/wiki_examples/Args/, and execute the Args program from the commandline, I get this:
$ args Argument Count: 0 args
If I use the common ./ syntax to execute the program, I get this:
$ ./args Argument Count: 0 ./args
As you can see, in an environment that supports argument passing, the Command_Name function returns the exact string used to invoke the program.
Ada.Command_Line.Set_Exit_Status
[edit | edit source]The specification for Set_Exit_Status looks like this:
procedure Set_Exit_Status (Code : Exit_Status);
If the environment supports the return of an task completion code, Set_Exit_Status allows you to set an exit status for the program. If you look at the specification for Ada.Command_Line, you will notice the type Exit_Status and the two variables Success and Failure. These two are defined as 0 and 1, respectively, but it is entirely possible to define your own exit status codes.
To see how that works, add this to the specification of the Args program:
More_Than_One_Arg : constant CLI.Exit_Status := 3;
And this to the body of the program:
ifCLI.Argument_Count = 0thenCLI.Set_Exit_Status (Code => CLI.Failure);elsifCLI.Argument_Count = 1thenCLI.Set_Exit_Status (Code => CLI.Success);elseCLI.Set_Exit_Status (Code => More_Than_One_Arg);endif;
What we do here is set the exit status depending on the number of arguments given to the program. This is what happens when we execute the program with various arguments:
$ ./args Argument Count: 0 $ echo $? 1 $ ./args one Argument Count: 1 $ echo $? 0 $ ./args one two Argument Count: 2 $ echo $? 3
echo $? outputs the exit code of the most recently executed program. On the first execution, we get a failure because no arguments are given. On the second execution, we get a success because exactly one argument is given. On the third execution, we get the special exit code 3 because more than one argument is given.
withAda.Text_IO;withAda.Command_Line;procedureArgsispackageIOrenamesAda.Text_IO;packageCLIrenamesAda.Command_Line; More_Than_One_Arg :constantCLI.Exit_Status := 3;beginIO.Put_Line (Item => "Argument Count:" & CLI.Argument_Count'Img);ifCLI.Argument_Count = 0thenCLI.Set_Exit_Status (Code => CLI.Failure);elsifCLI.Argument_Count = 1thenCLI.Set_Exit_Status (Code => CLI.Success);elseCLI.Set_Exit_Status (Code => More_Than_One_Arg);endif;endArgs;
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------packageAda.Command_LineispragmaPreelaborate (Command_Line);functionArgument_CountreturnNatural;functionArgument (Number :inPositive)returnString;functionCommand_NamereturnString;typeExit_Statusisrangeimplementation_defined .. implementation_defined; Success :constantExit_Status; Failure :constantExit_Status;procedureSet_Exit_Status (Code :inExit_Status);privatepragmaImport (Ada, Success);pragmaImport (Ada, Failure);endAda.Command_Line;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 95
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-comlin.ads
- Body: a-comlin.adb
drake
- Specification: environment/a-comlin.ads
- Body: environment/a-comlin.adb
Ada Programming/Libraries/Ada.Complex Text IO
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Complex_Text_IO is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Numerics.Complex_Types;withAda.Text_IO.Complex_IO;packageAda.Complex_Text_IOisnewAda.Text_IO.Complex_IO (Ada.Numerics.Complex_Types);
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-coteio.ads
drake
- Specification: textio/a-coteio.ads
Ada Programming/Libraries/Ada.Containers
[edit | edit source]This language feature is only available from Ada 2005 on.
Ada.Containers is a unit of the Predefined Language Environment since Ada 2005.
Specification
[edit | edit source]A typical —almost empty— root package. All the interesting stuff happens inside the child packages.
packageAda.ContainersispragmaPure (Containers);typeHash_Typeismodimplementation_defined;typeCount_Typeisrange0 .. implementation_defined;endAda.Containers;
See also
[edit | edit source]Child units
[edit | edit source]- Ada.Containers.Bounded_Doubly_Linked_Lists (Ada 2012)
- Ada.Containers.Bounded_Hashed_Maps (Ada 2012)
- Ada.Containers.Bounded_Hashed_Sets (Ada 2012)
- Ada.Containers.Bounded_Indefinite_Holders (Ada 2022)
- Ada.Containers.Bounded_Multiway_Trees (Ada 2012)
- Ada.Containers.Bounded_Ordered_Maps (Ada 2012)
- Ada.Containers.Bounded_Ordered_Sets (Ada 2012)
- Ada.Containers.Bounded_Priority_Queues (Ada 2012)
- Ada.Containers.Bounded_Synchronized_Queues (Ada 2012)
- Ada.Containers.Bounded_Vectors (Ada 2012)
- Ada.Containers.Doubly_Linked_Lists (Ada 2005)
- Ada.Containers.Generic_Array_Sort (generic procedure) (Ada 2005)
- Ada.Containers.Generic_Constrained_Array_Sort (generic procedure) (Ada 2005)
- Ada.Containers.Hashed_Maps (Ada 2005)
- Ada.Containers.Hashed_Sets (Ada 2005)
- Ada.Containers.Indefinite_Doubly_Linked_Lists (Ada 2005)
- Ada.Containers.Indefinite_Hashed_Maps (Ada 2005)
- Ada.Containers.Indefinite_Hashed_Sets (Ada 2005)
- Ada.Containers.Indefinite_Holders (Ada 2012)
- Ada.Containers.Indefinite_Multiway_Trees (Ada 2012)
- Ada.Containers.Indefinite_Ordered_Maps (Ada 2005)
- Ada.Containers.Indefinite_Ordered_Sets (Ada 2005)
- Ada.Containers.Indefinite_Vectors (Ada 2005)
- Ada.Containers.Multiway_Trees (Ada 2012)
- Ada.Containers.Ordered_Maps (Ada 2005)
- Ada.Containers.Ordered_Sets (Ada 2005)
- Ada.Containers.Synchronized_Queue_Interfaces (Ada 2012)
- Ada.Containers.Unbounded_Priority_Queues (Ada 2012)
- Ada.Containers.Unbounded_Synchronized_Queues (Ada 2012)
- Ada.Containers.Vectors (Ada 2005)
Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2005
[edit | edit source]Ada 2012
[edit | edit source]External links
[edit | edit source]
Ada Programming/Libraries/Ada.Containers.Bounded Doubly Linked Lists
[edit | edit source]This language feature has been introduced in Ada 2012.
Ada.Containers.Bounded_Doubly_Linked_Lists is a unit of the Predefined Language Environment since Ada 2012.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Iterator_Interfaces;generictypeElement_Typeisprivate;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Doubly_Linked_ListsispragmaPure(Bounded_Doubly_Linked_Lists);pragmaRemote_Types(Bounded_Doubly_Linked_Lists);typeList (Capacity : Count_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(List);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_List :constantList; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageList_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);function"=" (Left, Right : List)returnBoolean;functionLength (Container : List)returnCount_Type;functionIs_Empty (Container : List)returnBoolean;procedureClear (Container :inoutList);functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutList; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Element :inElement_Type));procedureUpdate_Element (Container :inoutList; Position :inCursor; Process :notnullaccessprocedure(Element :inoutElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinList; Position :inCursor)returnConstant_Reference_Type;functionReference (Container :aliasedinoutList; Position :inCursor)returnReference_Type;procedureAssign (Target :inoutList; Source :inList);functionCopy (Source : List; Capacity : Count_Type := 0)returnList;procedureMove (Target :inoutList; Source :inoutList);procedureInsert (Container :inoutList; Before :inCursor; New_Item :inElement_Type; Count :inCount_Type := 1);procedureInsert (Container :inoutList; Before :inCursor; New_Item :inElement_Type; Position :outCursor; Count :inCount_Type := 1);procedureInsert (Container :inoutList; Before :inCursor; Position :outCursor; Count :inCount_Type := 1);procedurePrepend (Container :inoutList; New_Item :inElement_Type; Count :inCount_Type := 1);procedureAppend (Container :inoutList; New_Item :inElement_Type; Count :inCount_Type := 1);procedureDelete (Container :inoutList; Position :inoutCursor; Count :inCount_Type := 1);procedureDelete_First (Container :inoutList; Count :inCount_Type := 1);procedureDelete_Last (Container :inoutList; Count :inCount_Type := 1);procedureReverse_Elements (Container :inoutList);procedureSwap (Container :inoutList; I, J :inCursor);procedureSwap_Links (Container :inoutList; I, J :inCursor);procedureSplice (Target :inoutList; Before :inCursor; Source :inoutList);procedureSplice (Target :inoutList; Before :inCursor; Source :inoutList; Position :inoutCursor);procedureSplice (Container:inoutList; Before :inCursor; Position :inCursor);functionFirst (Container : List)returnCursor;functionFirst_Element (Container : List)returnElement_Type;functionLast (Container : List)returnCursor;functionLast_Element (Container : List)returnElement_Type;functionNext (Position : Cursor)returnCursor;functionPrevious (Position : Cursor)returnCursor;procedureNext (Position :inoutCursor);procedurePrevious (Position :inoutCursor);functionFind (Container : List; Item : Element_Type; Position : Cursor := No_Element)returnCursor;functionReverse_Find (Container : List; Item : Element_Type; Position : Cursor := No_Element)returnCursor;functionContains (Container : List; Item : Element_Type)returnBoolean;procedureIterate (Container :inList; Process :notnullaccessprocedure(Position :inCursor));procedureReverse_Iterate (Container :inList; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inList)returnList_Iterator_Interfaces.Reversible_Iterator'Class;functionIterate (Container :inList; Start :inCursor)returnList_Iterator_Interfaces.Reversible_Iterator'Class;genericwithfunction"<" (Left, Right : Element_Type)returnBooleanis<>;packageGeneric_SortingisfunctionIs_Sorted (Container : List)returnBoolean;procedureSort (Container :inoutList);procedureMerge (Target :inoutList; Source :inoutList);endGeneric_Sorting;private-- not specified by the languageendAda.Containers.Bounded_Doubly_Linked_Lists;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-cbdlli.ads
- Body: a-cbdlli.adb
Ada Programming/Libraries/Ada.Containers.Bounded Hashed Maps
[edit | edit source]Warning: Display title "Ada Libraries/Libraries/Ada.Containers.Bounded_Hashed_Maps" overrides earlier display title "Ada Libraries/Libraries/Ada.Containers.Bounded_Doubly_Linked_Lists".
This language feature has been introduced in Ada 2012.
Ada.Containers.Bounded_Hashed_Maps is a unit of the Predefined Language Environment since Ada 2012.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Iterator_Interfaces;generictypeKey_Typeisprivate;typeElement_Typeisprivate;withfunctionHash (Key : Key_Type)returnHash_Type;withfunctionEquivalent_Keys (Left, Right : Key_Type)returnBoolean;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Hashed_MapsispragmaPreelaborate(Bounded_Hashed_Maps);pragmaRemote_Types(Bounded_Hashed_Maps);typeMap (Capacity : Count_Type; Modulus : Hash_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(Map);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_Map :constantMap; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageMap_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);function"=" (Left, Right : Map)returnBoolean;functionCapacity (Container : Map)returnCount_Type;procedureReserve_Capacity (Container :inoutMap; Capacity :inCount_Type);functionDefault_Modulus (Capacity : Count_Type)returnHash_Type;functionLength (Container : Map)returnCount_Type;functionIs_Empty (Container : Map)returnBoolean;procedureClear (Container :inoutMap);functionKey (Position : Cursor)returnKey_Type;functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutMap; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Key :inKey_Type; Element :inElement_Type));procedureUpdate_Element (Container :inoutMap; Position :inCursor; Process :notnullaccessprocedure(Key :inKey_Type; Element :inoutElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinMap; Position :inCursor)returnConstant_Reference_Type;functionReference (Container :aliasedinoutMap; Position :inCursor)returnReference_Type;functionConstant_Reference (Container :aliasedinMap; Key :inKey_Type)returnConstant_Reference_Type;functionReference (Container :aliasedinoutMap; Key :inKey_Type)returnReference_Type;procedureAssign (Target :inoutMap; Source :inMap);functionCopy (Source : Map; Capacity : Count_Type := 0; Modulus : Hash_Type := 0)returnMap;procedureMove (Target :inoutMap; Source :inoutMap);procedureInsert (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutMap; Key :inKey_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureInclude (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureReplace (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureExclude (Container :inoutMap; Key :inKey_Type);procedureDelete (Container :inoutMap; Key :inKey_Type);procedureDelete (Container :inoutMap; Position :inoutCursor);functionFirst (Container : Map)returnCursor;functionNext (Position : Cursor)returnCursor;procedureNext (Position :inoutCursor);functionFind (Container : Map; Key : Key_Type)returnCursor;functionElement (Container : Map; Key : Key_Type)returnElement_Type;functionContains (Container : Map; Key : Key_Type)returnBoolean;functionEquivalent_Keys (Left, Right : Cursor)returnBoolean;functionEquivalent_Keys (Left : Cursor; Right : Key_Type)returnBoolean;functionEquivalent_Keys (Left : Key_Type; Right : Cursor)returnBoolean;procedureIterate (Container :inMap; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inMap)returnMap_Iterator_Interfaces.Forward_Iterator'Class;private-- not specified by the languageendAda.Containers.Bounded_Hashed_Maps;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-cbhama.ads
- Body: a-cbhama.adb
Ada Programming/Libraries/Ada.Containers.Bounded Hashed Sets
[edit | edit source]Warning: Display title "Ada Libraries/Libraries/Ada.Containers.Bounded_Hashed_Sets" overrides earlier display title "Ada Libraries/Libraries/Ada.Containers.Bounded_Hashed_Maps".
This language feature has been introduced in Ada 2012.
Ada.Containers.Bounded_Hashed_Sets is a unit of the Predefined Language Environment since Ada 2012.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Iterator_Interfaces;generictypeElement_Typeisprivate;withfunctionHash (Element : Element_Type)returnHash_Type;withfunctionEquivalent_Elements (Left, Right : Element_Type)returnBoolean;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Hashed_SetsispragmaPreelaborate(Bounded_Hashed_Sets);pragmaRemote_Types(Bounded_Hashed_Sets);typeSet (Capacity : Count_Type; Modulus : Hash_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(Set);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_Set :constantSet; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageSet_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);function"=" (Left, Right : Set)returnBoolean;functionEquivalent_Sets (Left, Right : Set)returnBoolean;functionTo_Set (New_Item : Element_Type)returnSet;functionCapacity (Container : Set)returnCount_Type;procedureReserve_Capacity (Container :inoutSet; Capacity :inCount_Type);functionDefault_Modulus (Capacity : Count_Type)returnHash_Type;functionLength (Container : Set)returnCount_Type;functionIs_Empty (Container : Set)returnBoolean;procedureClear (Container :inoutSet);functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutSet; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Element :inElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinSet; Position :inCursor)returnConstant_Reference_Type;procedureAssign (Target :inoutSet; Source :inSet);functionCopy (Source : Set; Capacity : Count_Type := 0; Modulus : Hash_Type := 0)returnSet;procedureMove (Target :inoutSet; Source :inoutSet);procedureInsert (Container :inoutSet; New_Item :inElement_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutSet; New_Item :inElement_Type);procedureInclude (Container :inoutSet; New_Item :inElement_Type);procedureReplace (Container :inoutSet; New_Item :inElement_Type);procedureExclude (Container :inoutSet; Item :inElement_Type);procedureDelete (Container :inoutSet; Item :inElement_Type);procedureDelete (Container :inoutSet; Position :inoutCursor);procedureUnion (Target :inoutSet; Source :inSet);functionUnion (Left, Right : Set)returnSet;function"or" (Left, Right : Set)returnSetrenamesUnion;procedureIntersection (Target :inoutSet; Source :inSet);functionIntersection (Left, Right : Set)returnSet;function"and" (Left, Right : Set)returnSetrenamesIntersection;procedureDifference (Target :inoutSet; Source :inSet);functionDifference (Left, Right : Set)returnSet;function"-" (Left, Right : Set)returnSetrenamesDifference;procedureSymmetric_Difference (Target :inoutSet; Source :inSet);functionSymmetric_Difference (Left, Right : Set)returnSet;function"xor" (Left, Right : Set)returnSetrenamesSymmetric_Difference;functionOverlap (Left, Right : Set)returnBoolean;functionIs_Subset (Subset : Set; Of_Set : Set)returnBoolean;functionFirst (Container : Set)returnCursor;functionNext (Position : Cursor)returnCursor;procedureNext (Position :inoutCursor);functionFind (Container : Set; Item : Element_Type)returnCursor;functionContains (Container : Set; Item : Element_Type)returnBoolean;functionEquivalent_Elements (Left, Right : Cursor)returnBoolean;functionEquivalent_Elements (Left : Cursor; Right : Element_Type)returnBoolean;functionEquivalent_Elements (Left : Element_Type; Right : Cursor)returnBoolean;procedureIterate (Container :inSet; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inSet)returnSet_Iterator_Interfaces.Forward_Iterator'Class;generictypeKey_Type (<>)isprivate;withfunctionKey (Element : Element_Type)returnKey_Type;withfunctionHash (Key : Key_Type)returnHash_Type;withfunctionEquivalent_Keys (Left, Right : Key_Type)returnBoolean;packageGeneric_KeysisfunctionKey (Position : Cursor)returnKey_Type;functionElement (Container : Set; Key : Key_Type)returnElement_Type;procedureReplace (Container :inoutSet; Key :inKey_Type; New_Item :inElement_Type);procedureExclude (Container :inoutSet; Key :inKey_Type);procedureDelete (Container :inoutSet; Key :inKey_Type);functionFind (Container : Set; Key : Key_Type)returnCursor;functionContains (Container : Set; Key : Key_Type)returnBoolean;procedureUpdate_Element_Preserving_Key (Container :inoutSet; Position :inCursor; Process :notnullaccessprocedure(Element :inoutElement_Type));typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionReference_Preserving_Key (Container :aliasedinoutSet; Position :inCursor)returnReference_Type;functionConstant_Reference (Container :aliasedinSet; Key :inKey_Type)returnConstant_Reference_Type;functionReference_Preserving_Key (Container :aliasedinoutSet; Key :inKey_Type)returnReference_Type;endGeneric_Keys;private-- not specified by the languageendAda.Containers.Bounded_Hashed_Sets;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-cbhase.ads
- Body: a-cbhase.adb
Ada Programming/Libraries/Ada.Containers.Bounded Ordered Maps
[edit | edit source]Warning: Display title "Ada Libraries/Libraries/Ada.Containers.Bounded_Ordered_Maps" overrides earlier display title "Ada Libraries/Libraries/Ada.Containers.Bounded_Hashed_Sets".
This language feature has been introduced in Ada 2012.
Ada.Containers.Bounded_Ordered_Maps is a unit of the Predefined Language Environment since Ada 2012.
Specification
[edit | edit source]-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Iterator_Interfaces;generictypeKey_Typeisprivate;typeElement_Typeisprivate;withfunction"<" (Left, Right : Key_Type)returnBooleanis<>;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Ordered_MapsispragmaPure(Bounded_Ordered_Maps);pragmaRemote_Types(Bounded_Ordered_Maps);functionEquivalent_Keys (Left, Right : Key_Type)returnBoolean;typeMap (Capacity : Count_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(Map);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_Map :constantMap; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageMap_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);function"=" (Left, Right : Map)returnBoolean;functionLength (Container : Map)returnCount_Type;functionIs_Empty (Container : Map)returnBoolean;procedureClear (Container :inoutMap);functionKey (Position : Cursor)returnKey_Type;functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutMap; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Key :inKey_Type; Element :inElement_Type));procedureUpdate_Element (Container :inoutMap; Position :inCursor; Process :notnullaccessprocedure(Key :inKey_Type; Element :inoutElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinMap; Position :inCursor)returnConstant_Reference_Type;functionReference (Container :aliasedinoutMap; Position :inCursor)returnReference_Type;functionConstant_Reference (Container :aliasedinMap; Key :inKey_Type)returnConstant_Reference_Type;functionReference (Container :aliasedinoutMap; Key :inKey_Type)returnReference_Type;procedureAssign (Target :inoutMap; Source :inMap);functionCopy (Source : Map; Capacity : Count_Type := 0)returnMap;procedureMove (Target :inoutMap; Source :inoutMap);procedureInsert (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutMap; Key :inKey_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureInclude (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureReplace (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureExclude (Container :inoutMap; Key :inKey_Type);procedureDelete (Container :inoutMap; Key :inKey_Type);procedureDelete (Container :inoutMap; Position :inoutCursor);procedureDelete_First (Container :inoutMap);procedureDelete_Last (Container :inoutMap);functionFirst (Container : Map)returnCursor;functionFirst_Element (Container : Map)returnElement_Type;functionFirst_Key (Container : Map)returnKey_Type;functionLast (Container : Map)returnCursor;functionLast_Element (Container : Map)returnElement_Type;functionLast_Key (Container : Map)returnKey_Type;functionNext (Position : Cursor)returnCursor;procedureNext (Position :inoutCursor);functionPrevious (Position : Cursor)returnCursor;procedurePrevious (Position :inoutCursor);functionFind (Container : Map; Key : Key_Type)returnCursor;functionElement (Container : Map; Key : Key_Type)returnElement_Type;functionFloor (Container : Map; Key : Key_Type)returnCursor;functionCeiling (Container : Map; Key : Key_Type)returnCursor;functionContains (Container : Map; Key : Key_Type)returnBoolean;function"<" (Left, Right : Cursor)returnBoolean;function">" (Left, Right : Cursor)returnBoolean;function"<" (Left : Cursor; Right : Key_Type)returnBoolean;function">" (Left : Cursor; Right : Key_Type)returnBoolean;function"<" (Left : Key_Type; Right : Cursor)returnBoolean;function">" (Left : Key_Type; Right : Cursor)returnBoolean;procedureIterate (Container :inMap; Process :notnullaccessprocedure(Position :inCursor));procedureReverse_Iterate (Container :inMap; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inMap)returnMap_Iterator_Interfaces.Reversible_Iterator'Class;functionIterate (Container :inMap; Start :inCursor)returnMap_Iterator_Interfaces.Reversible_Iterator'Class;private-- not specified by the languageendAda.Containers.Bounded_Ordered_Maps;
See also
[edit | edit source]Wikibook
[edit | edit source]External examples
[edit source]- Search for examples of
Ada_Librariesin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook. - Search for posts related to
Ada_Librariesin: Stack Overflow, comp.lang.ada or any Ada related page.
Ada Reference Manual
[edit | edit source]Ada 2012
[edit | edit source]Open-Source Implementations
[edit | edit source]FSF GNAT
- Specification: a-cborma.ads
- Body: a-cborma.adb
Ada Programming/Libraries/Ada.Containers.Bounded Ordered Sets
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Bounded Ordered Sets
Ada Programming/Libraries/Ada.Containers.Bounded Priority Queues
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Bounded Priority Queues
Ada Programming/Libraries/Ada.Containers.Bounded Synchronized Queues
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Bounded Synchronized Queues
Ada Programming/Libraries/Ada.Containers.Bounded Vectors
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Bounded Vectors
Ada Programming/Libraries/Ada.Containers.Doubly Linked Lists
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Doubly Linked Lists
Ada Programming/Libraries/Ada.Containers.Generic Array Sort
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Generic Array Sort
Ada Programming/Libraries/Ada.Containers.Generic Constrained Array Sort
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Generic Constrained Array Sort
Ada Programming/Libraries/Ada.Containers.Generic Sort
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Generic Sort
Ada Programming/Libraries/Ada.Containers.Hashed Maps
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Hashed Maps
Ada Programming/Libraries/Ada.Containers.Hashed Sets
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Hashed Sets
Ada Programming/Libraries/Ada.Containers.Indefinite Doubly Linked Lists
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Doubly Linked Lists
Ada Programming/Libraries/Ada.Containers.Indefinite Hashed Maps
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Hashed Maps
Ada Programming/Libraries/Ada.Containers.Indefinite Hashed Sets
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Hashed Sets
Ada Programming/Libraries/Ada.Containers.Indefinite Holders
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Holders
Ada Programming/Libraries/Ada.Containers.Indefinite Multiway Trees
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Multiway Trees
Ada Programming/Libraries/Ada.Containers.Indefinite Ordered Maps
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Ordered Maps
Ada Programming/Libraries/Ada.Containers.Indefinite Ordered Sets
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Ordered Sets
Ada Programming/Libraries/Ada.Containers.Indefinite Vectors
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Indefinite Vectors
Ada Programming/Libraries/Ada.Containers.Multiway Trees
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Multiway Trees
Ada Programming/Libraries/Ada.Containers.Ordered Maps
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Ordered Maps
Ada Programming/Libraries/Ada.Containers.Ordered Sets
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Ordered Sets
Ada Programming/Libraries/Ada.Containers.Synchronized Queue Interfaces
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Synchronized Queue Interfaces
Ada Programming/Libraries/Ada.Containers.Unbounded Priority Queues
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Unbounded Priority Queues
Ada Programming/Libraries/Ada.Containers.Unbounded Synchronized Queues
[edit | edit source]Ada Programming/Libraries/Ada.Containers.Unbounded Synchronized Queues
