content
stringlengths
23
1.05M
---------------------------------------------------------------------------- -- Permission to use, copy, modify, and distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS P...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with GL.Enums.Textures; with GL.Helpers; with GL.API; package body GL.Fixed.Textures is procedure Set_Tex_Function (Func : Texture_Function) is begin API.Tex_Env_Tex_Func (Enums.Textures.T...
with Ada.Containers.Indefinite_Ordered_Sets; package String_Sets is new Ada.Containers.Indefinite_Ordered_Sets (Element_Type => String);
procedure All_Source_Text is beGin Some_Code; -- Both branches of the #if have a style violation (extra space before -- semicolon) that must be reported. #if Some_Condition then Do_Something ; #else Do_Something_else ; #end if; Some_More_Code; end All_Source_Text;
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. package body Apsepp.Generic_Fixture is -- Default_Allocator is referenced by Creator child package only. pragma Unreferenced (Default_Allocator); --------------------------------------------------------...
-- { dg-do compile } -- { dg-options "-O" } package body Slice2 is function F (I : R1) return R2 is Val : R2; begin Val.Text (1 .. 8) := I.Text (1 .. 8); return Val; end F; end Slice2;
with Ada.Containers.Vectors; with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure OneTwo is package Seen_Vecs is new Ada.Containers.Vectors(Element_Type => Integer, Index_Type => Natural); use Seen_Vecs; Position : Seen_Vecs.Cursor; SeenFrequencies :...
package eGL.Pointers is type Display_Pointer is access all eGL.Display; type NativeWindowType_Pointer is access all eGL.NativeWindowType; type NativePixmapType_Pointer is access all eGL.NativePixmapType; type EGLint_Pointer is access all eGL.EGLint; type EGLBoolean_Pointer is ac...
pragma License (Unrestricted); -- runtime unit with System.Long_Long_Integer_Types; package System.Formatting is pragma Pure; subtype Number_Base is Integer range 2 .. 16; -- same as Text_IO.Number_Base subtype Digit is Integer range 0 .. 15; type Type_Set is (Lower_Case, Upper_Case); -- same as Text_IO....
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- ...
----------------------------------------------------------------------- -- util-events-timers -- Timer list management -- Copyright (C) 2017 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 e...
-------------------------------------------------------------------------------- -- 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...
----------------------------------------------------------------------- -- events-tests -- Unit tests for AWA events -- 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 exc...
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017, AdaCore -- -- -- -- ...
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: License.txt with Ada.Command_Line; with Ada.Text_IO; with Parameters; with Pilot; with Unix; procedure Ravenadm is package CLI renames Ada.Command_Line; package TIO renames Ada.Text_IO; type mandate_type is (unset, he...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
package body gel.Camera.forge is function new_Camera return gel.Camera.item is begin return the_Camera : gel.Camera.item do define (the_Camera); end return; end new_Camera; function new_Camera return gel.Camera.view is Self : constant gel.Camera.view := new gel.Cam...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
pragma License (Unrestricted); -- implementation unit with Ada.Exceptions; with System.Native_Tasks; with System.Storage_Elements; with System.Synchronous_Objects; private with System.Unwind.Mapping; package System.Tasks is pragma Preelaborate; -- same as somethings of Tasking subtype Master_Level is Integ...
----------------------------------------------------------------------- -- keystore-buffers -- Buffer 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"); -- you may no...
with STM32.Board; use STM32.Board; with Circles; use Circles; with Rectangles; use Rectangles; package body Renderer is procedure Render(W : in out World; Cue : VisualCue) is begin RenderList(W.GetEnvironments); RenderList(W.GetEntities, Cue.Selected); RenderLinksList(W.GetLinks); ...
----------------------------------------------------------------------- -- gen-model-mappings -- Type mappings for Code Generator -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may no...
----------------------------------------------------------------------- -- ASF testsuite - Ada Server Faces Test suite -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "...
with System.Debug; -- assertions with C.errno; with C.sched; with C.signal; package body System.Native_Tasks is use type C.signed_int; use type C.unsigned_int; type sigaction_Wrapper is record -- ??? for No_Elaboration_Code Handle : aliased C.signal.struct_sigaction; end record; pragma Suppress_In...
-- { dg-do run } procedure Sizetype2 is function Ident_Int (X : Integer) return Integer is begin return X; end; type A is array (Integer range <>) of Boolean; subtype T1 is A (Ident_Int (- 6) .. Ident_Int (Integer'Last - 4)); subtype T2 is A (- 6 .. Ident_Int (Integer'Last - 4)); subtype T3 is A (...
-- Copyright 2018-2021 Bartek thindil Jasicki -- -- This file is part of Steam Sky. -- -- Steam Sky is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (a...
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Ada.Text_IO; package body Options_Dialog_Console is package TIO renames Ada.Text_IO; -------------------------------------------------------------------------------------------- -- check_ravenport...
-- BSD 2-Clause License -- -- Copyright (c) 2017, Zack Boll -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- ...
with RCP; with RCP.Control; with RCP.User; procedure Main is use RCP, RCP.Control, RCP.User; -- user 1 needs 3 resources and "uses them" 8 seconds at a time One : User_T (1, Short, 3, 8); -- user 2 needs 2 resources and "uses them" 12 seconds at a time Two : User_T (2, Short, 2, 12); ...
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Subtype_Indications is function Create (Not_Token : Program.Lexical_Elements.Lexical_Element_Acc...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Interfaces.C.Strings, System; use type Interfaces.C.int, System.Address; package body FLTK.Widgets.Valuators.Adjusters is procedure adjuster_set_draw_hook (W, D : in System.Address); pragma Import (C, adjuster_set_draw_hook, "adjuster_set_draw_hook"); pragma Inline (...
package body Array_Swapping is procedure Swap (A: in out ArrayType; I, J: in IndexType) with Depends => (A => (A, I, J)), Pre => I /= J, Post => A = A'Old'Update (I => A'Old(J), J => A'Old(I)) is T: ElementType; begin T := A(I); A(I) := A(...
package Animals.Flying_Horses is type Flying_Horse is new Animals.Animal with private; type Color is (Snow_White, Pitch_Black, Light_Pink); function Make (Horse_Color : Color) return Flying_Horse; overriding procedure Add_Wings (A : in out Flying_Horse; N : Positive); overriding...
-------------------------------------------------------------------------------- -- Fichier : foret.ads -- Auteur : MOUDDENE Hamza & CAZES Noa -- Objectif : Spécification du module Ensemble -- Crée : Dimanche Nov 10 2019 -------------------------------------------------------------------------------- gener...
with Runge_8th; with Text_IO; use Text_IO; with Quadrature; with Ada.Numerics.Generic_Elementary_Functions; procedure runge_8th_order_demo_3 is type Real is digits 15; package mth is new Ada.Numerics.Generic_Elementary_Functions(Real); use mth; -- for Sin package quadr is new Quadrature (Real, Sin); ...
with Ahven.Framework; package My_Tests is type Test is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Test); procedure INIT_TEST; procedure CLOSE_TEST; procedure SET_TEST; procedure GET_TEST; procedure GET_SET; procedure SETM_TEST; procedure RM_TEST; pro...
pragma Warnings (Off); pragma Style_Checks (Off); package body Float_portable_binary_transfer is inverse_scaling : constant Num := 1.0 / imposed_scaling; -- We rely on Ada's attributes of floating - point types, RM : A.5.3 procedure Split (f : in Num; m : out Mantissa_type; e : out Exponent_type) is ...
package body uxas.messages.Lmcptask.TaskAutomationRequest.SPARK_Boundary with SPARK_Mode => Off is ----------------------------------------- -- Get_EntityList_From_OriginalRequest -- ----------------------------------------- function Get_EntityList_From_OriginalRequest (Request : TaskAutomationReques...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2019 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 System.Machine_Reset; with Ada.Real_Time; use Ada.Real_Time; with System.Task_Primitives.Operations; with Config.Tasking; with Bounded_Image; use Bounded_Image; with Logger; with NVRAM; with HIL; with Interfaces; use Interfaces; with Unchecked_Conversion; -- @summary Catches all exceptions, logs them ...
with STM32_SVD.RCC; use STM32_SVD.RCC; with STM32_SVD.PWR; use STM32_SVD.PWR; package body STM32.SubGhzPhy is procedure SubGhzPhy_Init is Config : SPI_Configuration; begin Enable_Clock (SubGhzPhyPort.all); RCC_Periph.CSR.RFRST := False; loop exit when not RCC_Periph.CSR.RFRST...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
package DDS.Request_Reply is type Ref is limited interface; type Ref_Access is access all Ref'Class; procedure Log_Exception (Self : not null access Ref; Log : Standard.String) is null; end DDS.Request_Reply;
-- parse_args-concrete.ads -- A simple command line option parser -- Copyright (c) 2014 - 2015, James Humphry -- -- 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 permission notice appear in...
-- { dg-do compile } -- { dg-options "-O2 -fstack-usage" } with System; procedure Stack_Usage2 is Sink : System.Address; pragma Import (Ada, Sink); procedure Transmit_Data (Branch : Integer) is pragma No_Inline (Transmit_Data); X : Integer; begin case Branch is when 1 => Sink ...
-- Author: A. Ireland -- -- Address: School Mathematical & Computer Sciences -- Heriot-Watt University -- Edinburgh, EH14 4AS -- -- E-mail: a.ireland@hw.ac.uk -- -- Last modified: 13.9.2019 -- -- Filename: sensors.ads -- -...
-- Generated by Snowball 2.2.0 - https://snowballstem.org/ package body Stemmer.Hungarian is pragma Style_Checks ("-mr"); pragma Warnings (Off, "*variable*is never read and never assigned*"); pragma Warnings (Off, "*mode could be*instead of*"); pragma Warnings (Off, "*formal parameter.*is not modified*")...
type IO_Port is mod 2**8; -- One byte Device_Port : type IO_Port; for Device_Port'Address use 16#FFFF_F000#;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Ada.Strings.Unbounded; package body Test_Unit is task type Boring_Task_Type is entry Drop_Off_Work (Work_In : in Range_Type); end Boring_Task_Type; task body Boring_Task_Type is Work : Range_Type := 5; Result : Integer := 0; Factor : constant Positive := 2; begin loop ...
package body gel.Mouse is -------------- --- Attributes -- -- Nil. --------------- --- Operations -- procedure emit_button_press_Event (Self : in out Item'Class; Button : in mouse.button_Id; Modifiers : in keyboard.modi...
Ada.Numerics.e -- Euler's number Ada.Numerics.pi -- pi sqrt(x) -- square root log(x, base) -- logarithm to any specified base exp(x) -- exponential abs(x) -- absolute value S'floor(x) -- Produces the floor of an instance of subtype S S'ceiling(x) -- Produces the ceiling of an insta...
with System.Machine_Code; with AVR.USART; with AVR.TWI; with AVR.TIMERS.CLOCK; -- ============================================================================= -- Package body AVR.INTERRUPTS -- ============================================================================= package body AVR.INTERRUPTS is procedure En...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
with Ada.Integer_Text_IO; Use Ada.Integer_Text_IO; with Ada.Text_IO; Use Ada.Text_IO; with inventory_list; Use inventory_list; with player; Use player; with save_load_game; Use save_load_game; with stats; Use stats; Procedure player_test is response : Integer := -1; response2 : Integer := -...
with Text_IO; use Text_IO; procedure Tritest is Passed : Boolean := True; type Triangle is (Equilateral, Isosceles, Scalene, Not_A_Triangle); function Tritype(Len1, Len2, Len3 : in Integer) return Triangle is separate; procedure Compare(A, B, C: in...
-------------------------------------------------------------------------------- -- -- -- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. -- -- ...
-- Time-stamp: <02 oct 2012 09:38 queinnec@enseeiht.fr> with LR.Tasks; -- Simulateur temporel, avec possibilité de suspendre l'écoulement du temps, -- de varier la vitesse du temps, et d'interrompre un sommeil. package LR.Simu is -- Initialise le simulateur de temps pour `Nbproc' processus. procedure Init(...
with Ada.Interrupts; use Ada.Interrupts; with Ada.Real_Time; use Ada.Real_Time; with STM32_SVD.Interrupts; use STM32_SVD.Interrupts; generic Timer : STM32GD.Timer.Timer_Type := Timer_7; IRQ : Interrupt_ID := TIM7; package STM32GD.Timer.Peripheral is procedure Init; procedure Stop; procedure After (...
with System; package HAL.Bitmap is type Orientation_Mode is (Default, Portrait, Landscape); subtype Actual_Orientation is Orientation_Mode range Portrait .. Landscape; type Bitmap_Color_Mode is (ARGB_8888, RGB_888, RGB_565, ARGB_1555, ARGB_4444, L_8, ...
package Pack1 is package Nested is type Rec_Typ is record null; end record; end Nested; end Pack1;
----------------------------------------------------------------------- -- helios-commands -- Helios commands -- Copyright (C) 2017, 2018, 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...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
pragma License (Unrestricted); -- implementation unit package System.UTF_Conversions.From_16_To_8 is pragma Pure; pragma Suppress (All_Checks); -- for instantiation procedure Convert is new Convert_Procedure ( Wide_Character, Wide_String, Character, String, ...
-- ----------------------------------------------------------------------------- -- smk, the smart make (http://lionel.draghi.free.fr/smk/) -- © 2018, 2019 Lionel Draghi <lionel.draghi@free.fr> -- SPDX-License-Identifier: APSL-2.0 -- ----------------------------------------------------------------------------- -- Licen...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
-- { dg-do compile } procedure access2 is Arr : array (1..10) of aliased Float; type Acc is access all Float; procedure Set (X : integer) is Buffer: String (1..8); for Buffer'address use Arr (4)'address; begin Arr (X) := 31.1415; end; function Get (C : Integer) return Acc is begin ret...
with AUnit; with AUnit.Simple_Test_Cases; package kv.avm.Comm_Tests is type Comm_Test_Case is abstract new AUnit.Simple_Test_Cases.Test_Case with record null; end record; procedure Set_Up (T : in out Comm_Test_Case); procedure Tear_Down (T : in out Comm_Test_Case); type Test_01 is ne...
with Interfaces; use Interfaces; with MIDI; use MIDI; package MIDI_Synthesizer is Samplerate : constant Float := 44100.0; type Freq_Table is array (0 .. 127) of Float; type Generator is record PhaseIncrement : Float := 0.0; PhaseAccumulator : Float := 0.0; end record; type ADSR_St...
-- Copyright 2019 Michael Casadevall <michael@casadevall.pro> -- -- 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, cop...
-- reference: -- http://www.opensource.apple.com/ -- source/boot/boot-132/i386/libsaio/hfs_compare.c -- http://www.opensource.apple.com/ -- source/xnu/xnu-1504.15.3/bsd/vfs/vfs_utfconv.c with Ada.Unchecked_Conversion; with System.Address_To_Constant_Access_Conversions; with System.Address_To_Named_Access_Con...
-- 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,...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with Ada.Text_IO; use Ada.Text_IO; -- Permuter deux caractères lus au clavier procedure Permuter_Caracteres is C1, C2: Character; -- Entier lu au clavier dont on veut connaître le signe Temp: Character; -- Charactere utilisé pour la permutation begin -- Demander les deux caractères C1 et C2 ...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 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...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2021 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...
-- This file provides definitions for the high resolution timers on the -- STM32F3 (ARM Cortex M4F) microcontrollers from ST Microelectronics. pragma Restrictions (No_Elaboration_Code); with System; use System; with STM32_SVD.HRTIM; use STM32_SVD.HRTIM, STM32_SVD; package STM32.HRTimers is type HRTi...
-- The Village of Vampire by YT, このソースコードはNYSLです -- renderer ver.3 with Ada.Calendar; with Ada.Streams; with Web.Producers; with Tabula.Villages.Lists; with Vampire.Forms; package Vampire.R3 is function Read ( Template_Source : in String; Template_Cache : in String := "") return Web.Producers.Template; priva...
package body STM32.FMAC is ---------------- -- Reset_FMAC -- ---------------- procedure Reset_FMAC (This : in out FMAC_Accelerator) is begin This.CR.RESET := True; end Reset_FMAC; ----------------------------- -- Set_FMAC_Buffer_Address -- ----------------------------- procedure ...
with Ada.Characters.Wide_Wide_Latin_1; with Ada.Wide_Wide_Text_IO; with League.Strings; with Ada_Pretty; procedure Ada_Output_Test is function "+" (Text : Wide_Wide_String) return League.Strings.Universal_String renames League.Strings.To_Universal_String; procedure Print_API; ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
package GESTE_Fonts.FreeSerif5pt7b is Font : constant Bitmap_Font_Ref; private FreeSerif5pt7bBitmaps : aliased constant Font_Bitmap := ( 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#02#, 16#01#, 16#00#, 16#80#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 1...
-- This package has been generated automatically by GNATtest. -- You are allowed to add your code to the bodies of test routines. -- Such changes will be kept during further regeneration of this file. -- All code placed outside of test routine bodies will be lost. The -- code intended to set up and tear down the t...
-- CC1221A.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) 2016-2017, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
with P_StructuralTypes; use P_StructuralTypes; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package P_StepHandler is type T_StepHandler is abstract tagged private; type Ptr_Handler is access all T_StepHandler'Class; procedure Handle (Self : in out T_StepHandler) is abstract; ...
-- C85018A.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...
with interfaces.c.strings; package body agar.gui.colors is package cs renames interfaces.c.strings; use type c.int; package cbinds is function load (path : cs.chars_ptr) return c.int; pragma import (c, load, "AG_ColorsLoad"); function save (path : cs.chars_ptr) return c.int; pragma import (c, ...
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Cross_Reference_Updaters; with Program.Elements.Case_Statements; with Program.Interpretations; package Program.Complete_Contexts.Case_Statemen...
-- { dg-do compile } procedure late_overriding is package Pkg is type I is interface; procedure Meth (O : in I) is abstract; type Root is abstract tagged null record; type DT1 is abstract new Root and I with null record; end Pkg; use Pkg; type DT2 is new DT1 with null record; ...
package units with SPARK_Mode is type Unit_Type is new Float with -- As tagged Type? -> Generics with Unit_Type'Class Dimension_System => ((Unit_Name => Meter, Unit_Symbol => 'm', Dim_Symbol => 'L'), (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'), (Unit_Name => Se...
with Ada.Integer_Text_IO; with Ada.Text_IO; with Ada.Containers.Ordered_Sets; with PrimeUtilities; package body Problem_35 is package IO renames Ada.Text_IO; package I_IO renames Ada.Integer_Text_IO; subtype One_Million is Integer range 1 .. 1_000_000; package Million_Set is new Ada.Containers.Ordered_Sets(...
-- Copyright 2015,2016 Steven Stewart-Gallus -- -- 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/LICENSE-2.0 -- -- Unless required by applicable law ...
with Ada.Strings.Unbounded; with Lower_Layer_UDP; package Client_Collections is package ASU renames Ada.Strings.Unbounded; package LLU renames Lower_Layer_UDP; type Collection_Type is limited private; Client_Collection_Error: exception; procedure Add_Client (Collection: in out Collection_Type; ...
-- with Ada.Text_IO, Ada.Real_Time; -- use Ada.Text_IO, Ada.Real_Time; package body Use_CPU is -- T1, T2, T3 : Time; -- Time_Measured : Time_Span; -- Tolerance : Time_Span := Microseconds (50); -- X : Float := 0.0; -- Min : Integer := 0; -- Max : Integer := 10_000_000; -- NTimes : Integ...
function Palindrome (Text : String) return Boolean with Post => Palindrome'Result = (Text'Length < 2 or else ((Text(Text'First) = Text(Text'Last)) and then Palindrome(Text(Text'First+1 .. Text'Last-1))));
with Ada.Unchecked_Deallocation; package body Vecteur is procedure Free is new Ada.Unchecked_Deallocation (Object => T_Vecteur_Array, Name => T_Vecteur_Access); procedure Initialiser(Vecteur: out T_Vecteur; Capacite: in Natural) is begin Vecteur.Elements := new T_Vecteur_Array(0..Capacite-1); ...