content
stringlengths
23
1.05M
------------------------------------------------------------------------------ -- buffers.ads -- -- A generic package for bounded, blocking FIFO queues (buffers). It exports -- a proected type called 'Buffer'. Note that the maximum size of any buffer -- of this type is taken from a single generic package para...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Containers.Ordered_Maps; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package body CSV is package Associative_Str is new Ada.Containers.Ordered_Maps(Integer, Unbounded_String); package Associative_Data is new Ada.Containers.Ordered_Maps(Unbounded_String, Flo...
-- C47007A.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 Ada.Text_IO; use Ada.Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; package body Histograms is procedure Reset(hist : in out Histogram_Type) is begin hist.data.Clear; end Reset; procedure Increment(hist : in out Histogram_Type; key : in Key_Type) is ...
----------------------------------------------------------------------- -- keystore-passwords -- Password provider -- Copyright (C) 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 file excep...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with Ada.Strings.Unbounded; with Ada.Text_IO; with GL.Context; with GL_Test.Display_Backend; procedure GL_Test.Context is procedure Display_Context_Information is use Ada.Strings.Unbounded;...
with Ada.Text_IO, Ada.Containers.Generic_Array_Sort; procedure Largest_Int_From_List is function Img(N: Natural) return String is S: String := Integer'Image(N); begin return S(S'First+1 .. S'Last); -- First character is ' ' end Img; function Order(Left, Right: Natural) return Boolean is ...
-- $Header: /cf/ua/arcadia/alex-ayacc/ayacc/src/RCS/file_names.a,v 1.2 88/11/28 13:38:59 arcadia Exp $ -- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- The primary authors of ayacc were David Taback and Deepak Tolani. -- Enhancements were made by Ronald J. Schmalz. --...
with Ada.Command_Line; with Ada.Text_IO.Unbounded_IO; with Ada.Strings.Unbounded; with Markov; procedure Test_Markov is use Ada.Strings.Unbounded; package IO renames Ada.Text_IO.Unbounded_IO; Rule_File : Ada.Text_IO.File_Type; Line_Count : Natural := 0; begin if Ada.Command_Line.Argument_Count /= 2 the...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Containers; use Ada.Containers; with Ada.Containers.Vectors; with Utils; use Utils; package body Parser is -- The parse procedure procedure Parse_Input(Input : String; All_Parts : in out Parts_Vector.Vector) is Inp...
pragma Ada_2012; pragma Style_Checks (Off); pragma Warnings ("U"); with Interfaces.C; use Interfaces.C; with System; package stddef_h is -- unsupported macro: NULL __null -- arg-macro: procedure offsetof (TYPE, MEMBER) -- __builtin_offsetof (TYPE, MEMBER) subtype ptrdiff_t is int; -- /opt/gcc-11.2....
package body Hofstadter_Figure_Figure is type Positive_Array is array (Positive range <>) of Positive; function FFR(P: Positive) return Positive_Array is Figures: Positive_Array(1 .. P+1); Space: Positive := 2; Space_Index: Positive := 2; begin Figures(1) := 1; for I in 2 .. P l...
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../../License.txt package AdaBase.Results.Generic_Converters is generic type IntType is (<>); function convertstr (nv : Textual) return IntType; generic type RealType is digits <>; function convertst2 (n...
with System; with STM32_SVD; use STM32_SVD; with STM32_SVD.PWR; use STM32_SVD.PWR; with STM32_SVD.SCB; use STM32_SVD.SCB; with STM32_SVD.ADC; use STM32_SVD.ADC; package body STM32GD.Power is procedure Enable_Sleep is begin PWR_Periph.CR.LPDS := 0; PWR_Periph.CR.PDDS := 0; SCB_Periph.SCR.SLEEPD...
with Memory.Perfect_Prefetch; separate (Parser) procedure Parse_Perfect_Prefetch(parser : in out Parser_Type; result : out Memory_Pointer) is mem : Memory_Pointer := null; begin Parse_Memory(parser, mem); if mem = null then Raise_Error(parser, "memory not set in...
package Railway with SPARK_Mode is type One_Signal_State is (Red, Green); type Route_Type is (Route_Left_Middle, -- lewy do srodkowego Route_Middle_Right, -- srodkowy do prawego Route_Right_Middle, -- prawy do srodkowego Route_Middle_Left, -...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
-- -- Copyright 2021 (C) Jeremy Grosser <jeremy@synack.me> -- -- SPDX-License-Identifier: Apache-2.0 -- with Interfaces.C; use Interfaces.C; with Interfaces.C_Streams; package body Notcurses.Context is procedure Initialize is begin Default_Context := Notcurses_Context (Thin.notcurses_init (Defa...
-- -- Uwe R. Zimmer, Australia, 2013 -- with Ada.Unchecked_Deallocation; generic type Element is private; Default_Value : Element; package Generic_Protected is protected type Monitor is function Read return Element; procedure Write (E : Element); entry Wait_for_Update (E : out Element...
package Loop_Optimization6 is A : Integer := 0; procedure Main; end Loop_Optimization6;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- ...
with Ada.Text_IO, Ada.Numerics.Discrete_Random, HTML_Table; procedure Test_HTML_Table is -- define the Item_Type and the random generator type Four_Digits is mod 10_000; package Rand is new Ada.Numerics.Discrete_Random(Four_Digits); Gen: Rand.Generator; -- now we instantiate the generic package HTML_...
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt package Signals is -- Returns True if Interrupt signal (control-C) has been detected function graceful_shutdown_requested return Boolean; -- Enable exception handlers to initiate a shutdown upon detect...
-- { dg-do compile } -- { dg-options "-cargs -g -fgnat-encodings=minimal -dA -margs" } -- { dg-final { scan-assembler-not "DW_OP_const4u" } } -- { dg-final { scan-assembler-not "DW_OP_const8u" } } -- The DW_AT_byte_size attribute DWARF expression for the -- DW_TAG_structure_type DIE that describes Rec_Type contains ...
------------------------------------------------------------------------------- -- File: adaid.ads -- Description: A UUID type for Ada -- Author: Anthony Arnold -- License: Simplified BSD License (see LICENSE) ------------------------------------------------------------------------------- with Ada.Finalization; with I...
-- This unit provides sub-programs to encode/decode COBS from arrays in -- memory. The entire encoded/decoded frame must be available in a -- contiguous array. with System.Storage_Elements; use System.Storage_Elements; package COBS with Preelaborate is function Max_Encoding_Length (Data_Len : Storage_Count) ...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with Interfaces.C.Strings; with Interfaces.C.Pointers; with System; with Glfw.Input.Keys; with Glfw.Input.Mouse; with Glfw.Input.Joysticks; with Glfw.Monitors; with Glfw.Errors; with Glfw.Enums; with G...
with Ada.Integer_Text_IO; procedure Euler1 is Sum: Integer := 0; begin for I in Integer range 1 .. 999 loop if I mod 3 = 0 or I mod 5 = 0 then Sum := Sum + I; end if; end loop; Ada.Integer_Text_IO.Put(Sum); end Euler1;
with float_Math, c_math_c.Vector_2, c_math_c.Vector_3, c_math_c.Matrix_3x3, c_math_c.Matrix_4x4, Interfaces; package c_math_C.Conversion -- -- Provide a set of conversion utilities. -- is package Math renames float_Math; use Interfaces; function "+" (Self : in Integer) ...
-- Copyright (c) 2013, Nordic Semiconductor ASA -- 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, this -- lis...
pragma Ada_2012; with Interfaces; with System; package body PBKDF2_Generic is function PBKDF2 (Password : String; Salt : String; Iterations : Positive; Derived_Key_Length : Index) return Element_Array is Password_Buffer : Element_Array (Index (Password'First) .. Index (Passwo...
with AdaM.context_Line, AdaM.Context, gtk.Widget, gtk.Button; private with gtk.Check_Button, gtk.Box; package aIDE.Editor.of_context_line is type Item is new Editor.item with private; type View is access all Item'Class; package Forge is function to_context_line_Edit...
-- $Id: ErrorsDrv.mi,v 1.0 1993/01/16 11:25:41 grosch Exp $ -- $Log: ErrorsDrv.mi,v $ -- Ich, Doktor Josef Grosch, Informatiker, Sept. 1994 with Text_Io, Sets, Strings, Idents, Position, Errors; use Text_Io, Sets, Strings, Idents, Position, Errors; procedure ErrorsDr is Int : Integer; Short : Integer range...
-- 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.Exception_Identification.From_Here; with System.Zero_Terminated_Strings; with C.errno; with C.fcntl; with C.stdio; -- rename(2) with C.sys.sendfile; with C.unistd; package body System.Native_Directories.Copying is use Ada.Exception_Identification.From_Here; use type Ada.Exception_Identification.Exception...
-- { dg-do run } procedure Interface_Conv is package Pkg is type I1 is interface; procedure Prim (X : I1) is null; type I2 is interface; procedure Prim (X : I2) is null; type DT is new I1 and I2 with null record; end Pkg; use Pkg; Obj : DT; CW_3 : I2'Class := Obj; CW_5 ...
with MyCommandLine; with MyStringTokeniser; with PasswordDatabase; -- utility is a helper function with the aim to reduce code repetition within -- the main file package Utility with SPARK_Mode is Max_Line_Length : constant Natural := 2048; Put_Length : constant Natural := 3; Get_Rem_Pin_Length : constant Na...
-- SipHash.Discrete -- Implementing SipHash over a generic (relatively small) discrete type -- Copyright (c) 2015, James Humphry - see LICENSE file for details with Interfaces; use all type Interfaces.Unsigned_64; function SipHash.Discrete (m : T_Array) return Hash_Type is subtype T_Array_8 is T_Array(T_Index'Fi...
------------------------------------------------------------------------------ -- Copyright (c) 2014-2015, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
pragma SPARK_Mode; with Types; use Types; -- These are visible to the spec for SPARK Globals with Geo_Filter; -- with Pwm; with Zumo_LED; with Zumo_LSM303; with Zumo_L3gd20h; with Zumo_Motion; with Zumo_Motors; with Zumo_Pushbutton; with Zumo_QTR; with Wire; with Line_Finder; -- @summary -- The main entry poin...
----------------------------------------------------------------------- -- Copyright 2021 Lev Kujawski -- -- -- -- This file is part of B2SSUM. -- -- ...
-- Generated at 2017-03-27 17:51:44 +0000 by Natools.Static_Hash_Maps -- from src/natools-web-acl-maps.sx with Natools.Static_Maps.Web.ACL.Commands; package body Natools.Static_Maps.Web.ACL is function To_Command (Key : String) return Command is N : constant Natural := Natools.Static_Maps.Web.ACL....
pragma License (Unrestricted); -- implementation unit specialized for Windows with Ada.IO_Exceptions; with System.Storage_Elements; package System.Random_Initiators is pragma Preelaborate; procedure Get ( Item : Address; Size : Storage_Elements.Storage_Count); -- Exceptions Use_Error : exce...
with ada.Streams.stream_IO; with mmi.Forge, mmi.Window.lumen, mmi.Applet.gui_world, mmi.Camera; with mmi.Sprite, openGL.Model.box.lit_colored_textured, openGL.Model.sphere; with opengl.Palette, float_Math, ada.Calendar; procedure launch_add_rid_sprite_Test -- -- drops a ball...
pragma License (Unrestricted); -- extended unit private with Ada.Finalization; private with System.Native_Directories.Volumes; package Ada.Directories.Volumes is -- File system information. type File_System is limited private; -- subtype Assigned_File_System is File_System -- with -- Dynamic_Predica...
pragma Ada_2012; pragma Warnings (Off, "no entities"); with Ada.Text_Io; use Ada.Text_Io; with Ada.Exceptions; with Protypo.Tokens; use Protypo.Tokens; with Readable_Sequences.Generic_Sequences; use Readable_Sequences; package body Protypo.Parsing is use Ada.Stri...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
WITH P_StepHandler; USE P_StepHandler; with P_StructuralTypes; use P_StructuralTypes; package P_StepHandler.FeistelHandler is type T_BinaryIntegerArray is array (0..15) of T_BinaryUnit (1..4); type T_SBox is array (0..3, 0..15) of Integer; type T_SBoxArray is array (1..8) of T_SBox; type ...
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- ...
pragma Ada_2020; with Interfaces; use Interfaces; with Ada.Numerics; with Ada.Numerics.Generic_Elementary_Functions; package body Fmt.Generic_Ordinary_Fixed_Point_Argument is package Math is new Ada.Numerics.Generic_Elementary_Functions(Long_Float); Exp : constant Long_Long_Float := 10.0 ** Fixed_P...
-- Ada_GUI implementation based on Gnoga. Adapted 2021 -- -- -- GNOGA - The GNU Omnificent GUI for Ada -- -- -- -- G N O G A...
pragma License (Unrestricted); -- implementation unit specialized for Windows with C.windef; package System.Native_Time is pragma Preelaborate; -- representation type Nanosecond_Number is range -(2 ** (Duration'Size - 1)) .. 2 ** (Duration'Size - 1) - 1; for Nanosecond_Number'Size use Duration'Siz...
-- Abstract : -- -- Trace output to Ada.Text_IO -- -- Copyright (C) 2017, 2019, 2020 Free Software Foundation, Inc. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3,...
Pragma Ada_2012; Pragma Wide_Character_Encoding( UTF8 ); Package Risi_Script.Types with Pure is Enumeration_Prefix : Constant String:= "RT_"; ------------------------------------ -- Main Type Forward Declarration -- ------------------------------------ Type Extended_Enumeration; Type Indicator; ...
with agar.core.types; with agar.gui.surface; with agar.gui.types; package agar.gui.widget.icon is use type c.unsigned; subtype flags_t is agar.gui.types.widget_icon_flags_t; ICON_REGEN_LABEL : constant flags_t := 16#01#; ICON_DND : constant flags_t := 16#02#; ICON_DBLCLICKED : constant flags_t := ...
-- MIT License -- -- Copyright (c) 2021 Glen Cornell <glen.m.cornell@gmail.com> -- -- 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 rig...
-- { dg-do run } -- { dg-options "-O2" } procedure Opt5 is type Varray is array (1 .. 4) of Natural; procedure Check_All_Ones (A : Varray) is begin for J in A'Range loop if (A (J)) /= 1 then raise Program_Error; end if; end loop; end; X : constant Varray := (...
with Ada.Text_Io; use Ada.Text_Io; with Interfaces; use Interfaces; procedure Bitwise is subtype Byte is Unsigned_8; package Byte_Io is new Ada.Text_Io.Modular_Io(Byte); A : Byte := 255; B : Byte := 170; X : Byte := 128; N : Natural := 1; begin Put_Line("A and B = "); Byte_Io.Put(Item =>...
----------------------------------------------------------------------- -- are-installer-bundles -- Merge bundles for distribution artifact -- Copyright (C) 2013, 2021 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- ...
with utils, ada.Text_IO; use utils, Ada.Text_IO; package body read_preflop is Function Get_Winning_Chance (card1 : T_card; card2 : T_card) return Float is x,y : Integer; Begin if get_colour(card1) = get_colour(card2) then y := integer'Min(get_rank(card1),get_rank(card2)); x := integ...
package CompStats_Statistics is type Values_Array is array (Integer range <>) of Float; function Get_Count (Values : in Values_Array) return Integer; function Get_Minimum (Values : in Values_Array) return Float; function Get_Maximum (Values : Values_Array) return Float; function Get_Range ...
with Ada.Text_IO; use Ada.Text_IO; with kv.avm.Instructions; procedure kv.avm.test_a is x : instruction.overlay_type := (instruction.directive, instruction.no_op, false, false, 0); begin Put_Line("Hello there."); end kv.avm.test_a;
pragma Ada_2012; with Ada.Text_IO.Text_Streams; with Ada.Streams; with Ada.Streams.Stream_IO; with Ada.Strings.Unbounded; with Natools.Getopt_Long; with Natools.String_Slices; with Markup.Parsers.Markdown.Extensions; with Instances; with Markup.Parsers.Markdown.Extensions; package body Generator.Markdown is packag...
with System; package body TLV is type Base_Type is (Base_Integer, Base_Float, Base_String, Base_Sequence) with Size => 2; for Base_Type use ( Base_Integer => 0, Base_Float => 1, Base_String => 2, Base_Sequence => 3); type Tag_Value_Type is new Integer range 0 .. 63 wi...
with Text_IO; use Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; -- Afficher le plus petit et le plus grand élément d'une série d'entiers -- naturels lus au clavier. La saisie de la série se termine par 0 -- (qui n'appartient pas à la série). -- Exemple : 2, 9, 3, 6, 3, 0 -> min = 2 et max = 9 procedure ...
------------------------------------------------------------------------------ -- -- -- Common UUID Handling Package -- -- - RFC 4122 Implementation - -- -- ...
function Diff (Left, Right : Image) return Float is Offs_I : constant Integer := Right'First (1) - Left'First (1); Offs_J : constant Integer := Right'First (2) - Left'First (2); Sum : Count := 0; begin if Left'Length (1) /= Right'Length (1) or else Left'Length (2) /= Right'Length (2) then raise Constr...
package body System.UTF_Conversions is pragma Suppress (All_Checks); procedure unreachable with Import, Convention => Intrinsic, External_Name => "__builtin_unreachable"; pragma No_Return (unreachable); procedure UTF_8_Length ( Code : UCS_4; Leading : out Character; Length...
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- with Ada.Strings.Unbounded; with Ada.Text_...
with Symbols; with States; -- with Rules; package body Action_Lists is procedure Append (Action_List : in out List; Kind : in Actions.Action_Kind; Symbol : in Symbols.Symbol_Access; State : in States.State_Access; ...
package body openGL.Program.colored_textured is overriding procedure set_Uniforms (Self : in Item) is the_scale_Uniform : constant openGL.Variable.uniform.vec3 := Self.uniform_Variable ("uScale"); begin Self.set_mvp_Uniform; the_scale_Uniform.Value_is (Self.Scale); end set_Unif...
pragma License (Unrestricted); -- implementation unit specialized for POSIX (Darwin, FreeBSD, or Linux) with C.sys.types; with C.unistd; package System.Native_Credentials is pragma Preelaborate; subtype User_Id is C.sys.types.uid_t; subtype Group_Id is C.sys.types.gid_t; function Current_User return User...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
package body Lto19_Pkg1 is procedure Proc (R : Rec) is begin null; end; end Lto19_Pkg1;
------------------------------------------------------------------------------ -- -- -- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
-- 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.CLOCKS is pragma Preelaborate...
with AdaM.compilation_Unit, AdaM.a_Package, AdaM.a_Type, AdaM.Declaration.of_exception; package AdaM.Environment -- -- -- is type Item is tagged private; procedure add_package_Standard (Self : in out Item); procedure add (Self : in out Item; Unit : in compilation_Unit.view); pro...
with Ada.Text_Io; use Ada.Text_Io; with Ada.Integer_Text_Io; use Ada.Integer_Text_Io; with BT; use BT; procedure TestBT is Result, A, B, C : Balanced_Ternary; begin A := To_Balanced_Ternary("+-0++0+"); B := To_Balanced_Ternary(-436); C := To_Balanced_Ternary("+-++-"); Result := A * (B - C); Put("a ...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017-2018 Universidad Politécnica de Madrid -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- Copyright (c) 2015-2019, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
-- CC3016F.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...
package body casillero is procedure set_estado(c : in out t_casillero;e : in t_estado_casillero) is begin c.estado := e; end set_estado; function get_estado(c: in t_casillero) return t_estado_casillero is begin return c.estado; end get_estado; end casillero;
with Ada.Finalization; with Ada.Text_IO; with System.Address_Image; with System.Storage_Elements; with GC.Pools; procedure try_gc_controlled is package Dummies is type Dummy is new Ada.Finalization.Controlled with null record; overriding procedure Initialize (Object : in out Dummy); overriding procedure Finalize...
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with bits_types_h; package bits_types_time_t_h is -- Returned by `time'. subtype time_t is bits_types_h.uu_time_t; -- /usr/include/bits/types/time_t.h:7 end bits_types_time_t_h;
------------------------------------------------------------------------------- -- GPS -- -- Copyright © 2016 Eric Laursen -- -- This code is available under the "MIT License". -- Please see the file COPYING in this distribution for license terms. -- -- Purpose: -- This package interfaces to the Adafruit Ultimate GPS...
pragma Style_Checks (Off); package USB.Lang is Invalid : constant Lang_ID := 16#0000#; -- Invalid LANG ID Afrikaans : constant Lang_ID := 16#0436#; -- Afrikaans Albanian : constant Lang_ID := 16#041c#; -- Albanian Arabic_Saudi_Arabia : constan...
package Successeur is function plus(t1: Integer; t2: Integer) return Integer; end Successeur;
with Ada.Text_IO; use Ada.Text_IO; procedure Main is subtype Year_T is Positive range 1_900 .. 2_099; subtype Month_T is Positive range 1 .. 12; subtype Day_T is Positive range 1 .. 31; type Date_T is record Year : Positive; Month : Positive; Day : Positive; end record; -- impl...
-- Copyright 2019-2021 Free Software Foundation, Inc. -- -- This program 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 -- (at your option) any later version. -- -- ...
-- Smart_Ptrs_Tests -- Unit tests for Auto_Counters Smart_Ptrs package -- Copyright (c) 2016, James Humphry - see LICENSE file for details with AUnit.Assertions; with Smart_Ptrs; with Auto_Counters_Tests_Config; package body Smart_Ptrs_Tests is use AUnit.Assertions; Resources_Released : Natural := 0; p...
with Ada.Text_IO; use Ada.Text_IO; with Increment_By; procedure Show_Increment is A, B, C : Integer; begin C := Increment_By; -- ^ Parameterless call, value of I is 0 -- and Incr is 1 Put_Line ("Using defaults for Increment_By is " & Integer'Image (C)); A := 10; ...
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with SDL_stdinc_h; package SDL_cpuinfo_h is SDL_CACHELINE_SIZE : constant := 128; -- ..\SDL2_tmp\SDL_cpuinfo.h:95 -- Simple DirectMedia Layer -- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> -- This software i...
With Risi_Script.Interfaces, Ada.Containers.Indefinite_Vectors; Package Risi_Script.Parameter_Stack is Package Interfaces renames Risi_Script.Types.Interfaces; Package Implementation is new Ada.Containers.Indefinite_Vectors( "=" => Risi_Script.Types."=", Index_Type => positive, Ele...
with Imago; with Imago.IL; use Imago; with WFC; with GNAT.Command_Line; use GNAT.Command_Line; package Util is Argument_Error : exception; Execution_Error : exception; type Image_Color is (R, G, B); type Image_Pixel is array (Image_Color) of IL.UByte with Pack; type Image_Matrix is a...
with Ada.Text_IO; with GNAT.Sockets; with Interfaces; with Interfaces.C; with Kafka; with Kafka.Config; with Kafka.Consumer; with Kafka.Message; with Kafka.Topic; with Kafka.Topic.Partition; with Signal; with System; -- -- Basic Kafka consumer -- procedure Simple_Consumer is use type System.Address; use type I...
with Types; use Types; with Communication; use Communication; package Algorithm is type Algorithm_Type is (Pong); Safety_Exception : exception; Default_Velocity : Velocity := 320; type Abstract_Algorithm is abstract tagged record null; end record; type A...
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Buffer_Package; use Buffer_Package; with Utilities_Package; use Utilities_Package; package Editor_Package is type KEYSTROKE is record O : ERR_TYPE; C : Character; end record; type Editor is record Name : Unbounded_String; Doc...
private package GID.Decoding_GIF is -------------------- -- Image decoding -- -------------------- generic type Primary_color_range is mod <>; with procedure Set_X_Y (x, y: Natural); with procedure Put_Pixel ( red, green, blue : Primary_color_range; alpha : Primar...