content
stringlengths
23
1.05M
with My_Pack; with Suppack; with Ada.Text_IO; use Ada.Text_IO; procedure Test_Init is begin Put_Line (Integer'Image (My_Pack.Get)); My_Pack.Set (100); Put_Line (Integer'Image (My_Pack.Get)); Put_Line (Integer'Image (My_Pack.Get_Count)); Suppack.Print; Put_Line (Integer'Image (My_Pack.Get_Count)); ...
package body Math_2D.Vectors is use type Types.Real_Type; function Magnitude (Vector : in Types.Vector_t) return Types.Real_Type'Base is begin return Types.Functions.Sqrt (Square_Magnitude (Vector)); end Magnitude; function Square_Magnitude (Vector : in Types.Vector_t) return Types.Real_Type'Ba...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with Alea; -- Évaluer la qualité du générateur aléatoire dans plusieurs -- configurations. procedure Evaluer_Alea is Capacity : Constant Integer := 10000; Type T_List is array(1..Capacity) of Integer; Type T_Generator is reco...
--Just testing all the procedure pragmas I could think of. Procedure Pragmas is pragma List(Off); pragma Optimize(Off); Procedure TryInline is Foo : Integer := 0; begin null; end; pragma Inline(TryInline); begin null; end;
-- Tiny Text -- Copyright 2020 Jeremy Grosser -- See LICENSE for details with HAL.Bitmap; use HAL.Bitmap; with HAL; package Tiny_Text is Font_Width : constant := 3; Font_Height : constant := 6; subtype Font_Character is HAL.UInt18; type Font_Array is array (Character) of Font_Character; Font_Dat...
----------------------------------------------------------------------- -- mgrep-scanner -- Scan a directory and parse mail -- Copyright (C) 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this f...
----------------------------------------------------------------------- -- Secret -- Ada wrapper for Secret Service -- Copyright (C) 2017, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this fil...
package Opt12_Pkg is type Static_Integer_Subtype is range -32_000 .. 32_000; function Equal (L, R: Static_Integer_Subtype) return Boolean; type My_Fixed is delta 0.1 range -5.0 .. 5.0; Fix_Half : My_Fixed := 0.5; end Opt12_Pkg;
-- ________ ___ ______ ______ ___ -- /___ .. ._/ |.| |.___.\ /. __ .\ __|.| ____ -- / .. / |.| |.____/ |.|__|.| / .. ..| __\ .. \ -- _/ .. /___ |.| |.| === | .. __ .. ||. = .| | = .. | -- /_______/ |_| /__| /__| |_| \__\_| \__\_| -- Zip library ------------...
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- Copyright (C) 2010, Alexander Senier -- Copyright (C) 2010, secunet Security Networks AG -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or w...
pragma License (Unrestricted); with Ada.Directories; with Ada.Hierarchical_File_Names; package GNAT.Directory_Operations is subtype Dir_Name_Str is String; subtype Dir_Type is Ada.Directories.Search_Type; Directory_Error : exception; -- Basic Directory operations procedure Change_Dir (Dir_Name : Di...
------------------------------------------------------------------------------ -- -- -- Hardware Abstraction Layer for STM32 Targets -- -- -- -- ...
-- { dg-do compile } -- { dg-options "-O2 -fdump-tree-optimized" } with Opt51_Pkg; use Opt51_Pkg; procedure Opt51 (E: Enum; F : out Float) is begin case (E) is when One => F := 1.0; when Two => F := 2.0; when Three => F := 3.0; when others => raise Program_Error; end case; ...
-------------------------------------------------------------------- --| Package : Stack_Package Version : 2.0 -------------------------------------------------------------------- --| Abstract : Specification of a classic stack. ---------------------------------------------------------...
with P_StructuralTypes; use P_StructuralTypes; with Ada.Integer_Text_IO; with Ada.Sequential_IO; with Ada.Strings.Unbounded.Text_IO; with Ada.Text_IO; package body P_StepHandler.OutputHandler is ------------------------------------------------------------------------- ------------------------- CONSTRUCTOR -...
with GMP; private with C.mpfr; package MPFR is pragma Preelaborate; pragma Linker_Options ("-lmpfr"); function Version return String; subtype Number_Base is GMP.Number_Base; type Precision is mod 2 ** GMP.Exponent'Size; type Rounding is ( To_Nearest_With_Ties_Away_From_Zero, To_Nearest, Towards_Zero...
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Ada.Strings.Wide_Wide_Fixed; with Ada.Wide_Wide_Characters.Handling; package body Program.GNAT_Unit_Naming is -------------------- -- Body_Text...
package body lace.Observer.deferred is package body Forge is function to_Observer (Name : in Event.observer_Name) return Item is begin return Self : constant Item := (Deferred.item with name => to_unbounded_String (Name)) do ...
----------------------------------------------------------------------- -- countries - A simple bean example -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in c...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Ada.Text_IO, POSIX.Process_Identification, POSIX.Unsafe_Process_Primitives; procedure Fork is use Ada.Text_IO, POSIX.Process_Identification, POSIX.Unsafe_Process_Primitives; begin if Fork = Null_Process_ID then Put_Line ("This is the new process."); else Put_Line ("Thi...
-- Shoot'n'loot -- Copyright (c) 2020 Fabien Chouteau with Game_Assets.Misc_Objects; with GESTE.Maths_Types; use GESTE.Maths_Types; package body Projectile is Empty_Tile : constant GESTE_Config.Tile_Index := Game_Assets.Misc_Objects.Item.Empty_Tile.Tile_Id; procedure Move_Tile (This : in out Instance...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Exceptions; use Ada.Exceptions; procedure Bad_Lunch is -- Enumeration type type Lunch_Spot_t is (WS, Nine, Home); type Day_t is (Sun, Mon, Tue, Wed, Thu, Fri, Sat); -- Subtype Weekday_t is a constrained Day_t subtype Weekday_t is Day_t range Mon ....
-- C94008C.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimit...
-- C37009A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimit...
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and t...
------------------------------------------------------------------------------ -- -- -- P G A D A . D A T A B A S E -- -- -- -- ...
with Ahven, float_Math.Algebra.linear.d2; with Ada.Text_IO; use Ada.Text_IO; package body math_Tests.linear_Algebra_2d is use Ahven, float_Math; function almost_Equal (Left, Right : in Real) return Boolean is Tolerance : constant := 0.000_000_1; begin return abs (Left - Ri...
pragma License (Unrestricted); -- implementation unit required by compiler with System.Long_Long_Integer_Types; with System.Unsigned_Types; package System.Img_Uns is pragma Pure; -- required for Modular'Image by compiler (s-imguns.ads) procedure Image_Unsigned ( V : Unsigned_Types.Unsigned; S : ...
----------------------------------------------------------------------- -- servlet-filters-cache_control -- HTTP response Cache-Control settings -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- y...
with screen_io, maze; use screen_io , maze; with integer_text_io; use integer_text_io ; procedure hilbert is here: position ; this_way: direction := up; last_d: direction := up; order: integer ; procedure draw_line(l: integer) is c: character ; steps: integer := l ; begin if this_...
with Gtk.Window; use Gtk.Window; with Gtk.Enums; with Gtk.Handlers; with Gtk.Main; with Gdk; with Gdk.Event; with Glib; use Glib; with Cairo; use Cairo; with Gdk.Cairo; pragma Elaborate_All (Gtk.Handlers); procedure Greyscale is Win : Gtk_Window; Width : constant := 640; Height : constan...
-- { dg-do run } with Ada.Real_Time; procedure Test_Delay is begin delay until Ada.Real_Time.Clock; end Test_Delay;
procedure dynamic_array is type OpenArray is array (Natural range <>) of Integer; subtype ShortArray is OpenArray(1..4); type ItemArray is access ShortArray; Items : ItemArray := new ShortArray; begin Items.all := ShortArray'(others => 0); end dynamic_array;
------------------------------------------------------------ -- -- ADA REAL-TIME TIME-TRIGGERED SCHEDULING SUPPORT -- -- @file time_triggered_scheduling.adb -- -- @package Time_Triggered_Scheduling (BODY) -- -- @brief -- Ada Real-Time Time Triggered Scheduling support : Time Triggered Scheduling -- -- Ravenscar...
-- part of ParserTools, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "copying.txt" package body Text.Builder.Unicode is procedure Append (Object : in out Reference; Value : Strings_Edit.UTF8.Code_Point) is Buffer : String (1 .. 4); Position : ...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2018 onox <denkpadje@gmail.com> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/L...
with Ada.Exceptions; with Ada.Text_IO; use Ada.Text_IO; with CORBA.Impl; with CORBA.Object; with CORBA.ORB; with PortableServer.POA.Helper; with PortableServer.POAManager; with CorbaCBSG.CBSG.Impl; with PolyORB.CORBA_P.CORBALOC; -- Allow to specify how PolyORB should work with PolyORB.Setup.No_Tasking_Server;...
-------------------------------------------------------------------------------- -- Copyright (c) 2013, Felix Krause <contact@flyx.org> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this pe...
with Ada.Text_Io; package body Callbacks is procedure On_Change (Value : in Integer) is begin Ada.Text_Io.Put_Line("On_Change(" & Value'Image & ") called"); end; end Callbacks;
-- MIT License -- Copyright (c) 2021 Stephen Merrony -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify,...
pragma License (Unrestricted); -- runtime unit with System.Unwind.Representation; package System.Unwind.Handling is pragma Preelaborate; -- hook for entering an exception handler (a-exexpr-gcc.adb) procedure Begin_Handler ( Machine_Occurrence : Representation.Machine_Occurrence_Access) with Expo...
with Ada.Text_Io, Ada.Integer_Text_Io; use Ada.Text_Io, Ada.Integer_Text_Io; with matrices,posicion_en_matriz; use matrices; procedure prueba_posicion_en_matriz is M1:Matriz_De_Enteros(1..4, 1..10); numero, posicion_fila, posicion_columna: Integer; begin -- Caso de prueba 1: M1 := ((1, 3, 5, 7, 9, 11...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
pragma License (Unrestricted); package Ada.Calendar.Arithmetic is -- Arithmetic on days: type Day_Count is range -366 * (1 + Year_Number'Last - Year_Number'First) .. +366 * (1 + Year_Number'Last - Year_Number'First); subtype Leap_Seconds_Count is Integer range -2047 .. 2047; procedure Diffe...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
----------------------------------------------------------------------- -- gprofiler-events - Profiler Events Description -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this fil...
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
-- Copyright (C) 2021 Steve Merrony -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, d...
-- -- Copyright (C) 2022 Jeremy Grosser <jeremy@synack.me> -- -- SPDX-License-Identifier: BSD-3-Clause -- generic type Word is mod <>; type Word_Array is array (Natural range <>) of Word; package CRC with Preelaborate is Poly : Word; Sum : Word := 0; procedure Update (Data : Word); proce...
with Ada.Exception_Identification.From_Here; with Ada.Exceptions.Finally; with Ada.Unchecked_Deallocation; with System.Form_Parameters; with System.Native_IO.Names; with System.Standard_Allocators; with System.Storage_Elements; package body Ada.Streams.Naked_Stream_IO is use Exception_Identification.From_Here; us...
----------------------------------------------------------------------- -- keystore-repository-data -- Data access and management for the keystore -- Copyright (C) 2019, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"...
with Ada.Text_IO; use Ada.Text_IO; procedure Test is begin Put('A'); New_Line; end;
with Ada.Text_IO; with Ada.Numerics.Generic_Elementary_Functions; with Thiele; procedure Main is package Math is new Ada.Numerics.Generic_Elementary_Functions (Long_Float); package Float_Thiele is new Thiele (Long_Float); use Float_Thiele; Row_Count : Natural := 32; X_Values : Real_Array (1 .. ...
pragma License (Unrestricted); -- implementation unit package System.Form_Parameters is pragma Preelaborate; -- parsing form parameter -- the format is "keyword1=value1,keyword2=value2,..." procedure Get ( Form : String; Keyword_First : out Positive; Keyword_Last : out Natural; ...
----------------------------------------------------------------------- -- package body Crout_LU, LU decomposition, with equation solving -- Copyright (C) 2008-2018 Jonathan S. Parker. -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provi...
package Volatile12 is type Arr is array (Integer range <>) of Integer with Volatile; procedure Proc (A : Arr); end Volatile12;
pragma Ada_2012; package body String_Sets is ------------------- -- To_Set_String -- ------------------- function To_Set_String (X : String) return Set_String is Result : Set_String (X'Range); begin for K in X'Range loop Result (K) := To_Set (X (K)); end loop; retur...
-- -- Copyright (C) 2013 Reto Buerki <reet@codelabs.ch> -- Copyright (C) 2013 Adrian-Ken Rueegsegger <ken@codelabs.ch> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- 1. Redistrib...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Interfaces; with Ada.Streams; generic with procedure Raw_Read (Address : Interfaces.Unsigned_8; Value : out Interfaces.Unsigned_8); ...
-- -- Copyright 2022 (C) Nicolas Pinault (aka DrPi) -- -- SPDX-License-Identifier: BSD-3-Clause -- with Ada.Text_IO; use Ada.Text_IO; package body Errors is function Fail (Code : Exit_Status; Msg : String) return Exit_Status is begin Put_Line (Msg); return Code; end Fail; f...
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package body Program.Nodes.Short_Circuit_Operations is function Create (Left : not null Program.Elements.Expressions.Expression_Access; A...
----------------------------------------------------------------------- -- awa-mail-components-factory -- Mail UI Component Factory -- Copyright (C) 2012, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may ...
package body Benchmark.Hash is function Create_Hash return Benchmark_Pointer is begin return new Hash_Type; end Create_Hash; procedure Set_Argument(benchmark : in out Hash_Type; arg : in String) is value : constant String := Extract_Argument(arg); begin ...
-- Copyright (c) 2020 Raspberry Pi (Trading) Ltd. -- -- SPDX-License-Identifier: BSD-3-Clause -- This spec has been automatically generated from rp2040.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package RP_SVD.ROSC is pragma Preelaborate; ...
with Ada.Strings.Unbounded; with Ada.Text_IO; package body kv.avm.Code_Buffers is function "+"(S : String) return String_Type renames Ada.Strings.Unbounded.To_Unbounded_String; function "+"(U : String_Type) return String renames Ada.Strings.Unbounded.To_String; procedure Put_Meta (Self : in out Buffe...
-- ___ _ ___ _ _ -- -- / __| |/ (_) | | Common SKilL implementation -- -- \__ \ ' <| | | |__ stream manipulation package -- -- |___/_|\_\_|_|____| by: Timm Felden, Dennis Przytarski ...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017, AdaCore -- -- -- -- ...
package body Self is function G (X : Integer) return Lim is begin return R : Lim := (Comp => X, others => <>); end G; procedure Change (X : in out Lim; Incr : Integer) is begin X.Comp := X.Comp + Incr; X.Self_Default.Comp := X.Comp + Incr; X.Self_Anon_Default.Comp := ...
----------------------------------------------------------------------- -- messages - A simple memory-based forum -- Copyright (C) 2012, 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file ...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017-2020, Fabien Chouteau -- -- -- -- ...
with Ada.Numerics.Generic_Elementary_Functions; with Ada.Text_IO; use Ada.Text_IO; with GNATCOLL.GMP.Integers; with GNATCOLL.GMP.Lib; procedure Hamming is type Log_Type is new Long_Long_Float; package Funcs is new Ada.Numerics.Generic_Elementary_Functions (Log_Type); type Factors_Array is array (Positive ra...
with ACO.Events; package body ACO.Protocols.Error_Control is overriding function Is_Valid (This : in out EC; Msg : in ACO.Messages.Message) return Boolean is pragma Unreferenced (This); use type ACO.Messages.Function_Code; begin return ACO.Messages.Func_Code (Ms...
-- (C) Copyright 2000 by John Halleck, All rights reserved. -- Basic Routines of NSA's Secure Hash Algorithm. -- This is part of a project at http://www.cc.utah.edu/~nahaj/ package SHA.Process_Data is -- If you want to accumulate more than one hash at a time, then -- you'll need to specify a context for ea...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Ada.Characters.Handling; use Ada.Characters.Handling; package Apsepp.Characters is subtype ISO_646_Upper_Letter is ISO_646 range 'A' .. 'Z'; end Apsepp.Characters;
with Ada.Strings.Hash; function Ada.Strings.Bounded.Hash (Key : Bounded.Bounded_String) return Containers.Hash_Type is begin return Strings.Hash (Key.Element (1 .. Key.Length)); end Ada.Strings.Bounded.Hash;
-- -- mykernel/ada/bootboot.ads -- -- Copyright (C) 2017 - 2021 bzt (bztsrc@gitlab) -- -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation ...
Чайковский Чайковский2
------------------------------------------------------------------------------- -- Copyright 2021, The Septum Developers (see AUTHORS file) -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at ...
with Ada.Text_IO; with Ada.Strings.Fixed; with AWS.Config.Set; with AWS.Server; with HTTPd.Callbacks; procedure HTTPd.Main is Web_Server : AWS.Server.HTTP; Web_Config : AWS.Config.Object; begin -- Show header Ada.Text_IO.New_Line; Ada.Text_IO.Put_Line(" HH HH TTTTTTT TTTTTTT PPPPPP dd "); ...
with STM32_SVD; use STM32_SVD; with System; use System; package body STM32GD.GPIO.Port is function GPIO_Port_Representation (Port : STM32_SVD.GPIO.GPIO_Peripheral) return UInt4 is begin if Port'Address = GPIOA_Base then return 0; elsif Port'Address = GPIOB_Base then return 1; ...
----------------------------------------------------------------------- -- util-streams-sockets -- Socket streams -- Copyright (C) 2012, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this...
-- { dg-do compile } -- { dg-options "-O2" } with Text_IO; use Text_IO; with System.Storage_Elements; use System.Storage_Elements; with Warn12_Pkg; use Warn12_Pkg; procedure Warn12 (N : Natural) is Buffer_Size : constant Storage_Offset := Token_Groups'Size/System.Storage_Unit + 4096; Buffer ...
package Inheritance is type Animal is tagged private; type Dog is new Animal with private; type Cat is new Animal with private; type Lab is new Dog with private; type Collie is new Dog with private; private type Animal is tagged null record; type Dog is new Animal with null record; type Cat is n...
-- convert UCD/UnicodeData.txt (13, 14) -- bin/ucd_simplecasemapping $UCD/UnicodeData.txt > ../source/strings/a-uscama.ads with Ada.Command_Line; use Ada.Command_Line; with Ada.Containers.Ordered_Maps; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Text_IO; use Ada.Text_IO; procedure ucd_simplecasemapping ...
-- { dg-do compile } -- { dg-options "-gnat12 -gnato" } package Cond_Expr1 is function Tail (S : String) return String is (if S'Last <= S'First then "" else S (S'First + 1 .. S'Last)); end Cond_Expr1;
with AdaBase; with Connect; with CommonText; with Ada.Text_IO; with AdaBase.Results.Sets; procedure Bad_Select is package CON renames Connect; package TIO renames Ada.Text_IO; package ARS renames AdaBase.Results.Sets; package CT renames CommonText; row : ARS.Datarow; sql : String := "SELECT fruit,...
-- { dg-do compile } -- { dg-options "-O2 -gnatpn" } with Ada.Characters.Handling; use Ada.Characters.Handling; package body Opt20 is type Build_Mode_State is (None, Static, Dynamic, Relocatable); procedure Build_Library (For_Project : Integer) is Project_Name : constant String := Get_Name_String (For_P...
with AWS.Client, AWS.Response, AWS.Resources, AWS.Messages; with Ada.Text_IO, Ada.Strings.Fixed; use Ada, AWS, AWS.Resources, AWS.Messages; procedure Get_UTC_Time is Page : Response.Data; File : Resources.File_Type; Buffer : String (1 .. 1024); Position, Last : Natural := 0; ...
with Ada.Text_IO; procedure Goodbye_World is begin Ada.Text_IO.Put("Goodbye, World!"); end Goodbye_World;
----------------------------------------------------------------------- -- druss-commands-get -- Raw JSON API Get command -- Copyright (C) 2017, 2018, 2019, 2021 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you ma...
-- { dg-do compile } -- { dg-options "-O -gnatp" } with Loop_Optimization5_Pkg; use Loop_Optimization5_Pkg; procedure Loop_Optimization5 is Str : constant String := "12345678"; Cmd : constant String := Init; StartP : Positive := Cmd'First; StartS : Positive := Cmd'Last + 1; EndP : Natural := StartP -...
with Ada.Text_IO; with Generic_Shuffle; procedure Test_Shuffle is type Integer_Array is array (Positive range <>) of Integer; Integer_List : Integer_Array := (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18); procedure Integer_Shuffle is new Generic_Shuffle(Element_Type => Integer, ...
with Text_IO; use Text_IO; procedure hello_world is begin Put_Line("Hello World."); end hello_world;
package body ROSA.Tasks is procedure Create (Task_ID, Priority : in Unsigned_8; t : out Tasking) is begin t.Task_ID := Task_ID; t.Priority := Priority; t.State := Waiting; end Create; function Run (t : in Tasking) return Task_Status is begin if t.State /= Ready then ret...
pragma Ada_2012; with Tokenize.Token_Vectors; with Ada.Strings.Fixed; package body EU_Projects.Efforts is ----------- -- Parse -- ----------- function Parse (Spec : String) return Effort_Maps.Map is use Tokenize; use Tokenize.Token_Vectors; use EU_Projects.Nodes.Partners; use Ada...
with Ada.Unchecked_Conversion; with System.Address_To_Named_Access_Conversions; with System.Growth; with System.Standard_Allocators; with System.Storage_Elements; with System.System_Allocators.Allocated_Size; package body Ada.Strings.Generic_Unbounded is use type Streams.Stream_Element_Offset; use type System.Add...
pragma License (Unrestricted); with Ada.Numerics.Generic_Elementary_Functions; package Ada.Numerics.Long_Elementary_Functions is new Generic_Elementary_Functions (Long_Float); pragma Pure (Ada.Numerics.Long_Elementary_Functions);