content
stringlengths
23
1.05M
with STM32_SVD; use STM32_SVD; generic I2C : Natural; package STM32GD.I2C.Peripheral is pragma Preelaborate; procedure Init; function Master_Transmit (Address : I2C_Address; Data : Byte; Restart : Boolean := False) return Boolean; function Master_Receive (Address : I2C_Address; Data : out Byte...
-- 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...
-- { dg-do compile } -- { dg-options "-g -gnatVa" } with Unchecked_Conversion; procedure Unchecked_Convert7 is type BPA is array (1 .. 23) of Boolean; pragma Pack (BPA); for BPA'Size use 23; subtype Byte is Natural range 0 .. 255; type R is record S : Boolean; E : Byte; F : BPA; ...
separate(Practica6) procedure Extraer (L: in out Lista; V: in Integer) is aux:Pnodo; begin aux := l.Inicio; while Aux.info /= V loop Aux := aux.siguiente; if aux = null then return;-- si llega al final de la lista y no lo ha encontrado sale de procedimiento end if; end loop; -- si salgo es que encontrado ...
with AAA.Strings; package body Adabots is use Adabots_Lua_Dispatcher; -- public: function Create_Turtle return Turtle is begin return (Ada.Finalization.Limited_Controlled with Dispatcher => Create_Lua_Dispatcher); end Create_Turtle; function Create_Turtle (Port : Integer) r...
with STM32_SVD; use STM32_SVD; with STM32_SVD.USART; package STM32GD.USART is pragma Preelaborate; USART_1 : STM32_SVD.USART.USART_Peripheral renames STM32_SVD.USART.USART1_Periph; USART_2 : STM32_SVD.USART.USART_Peripheral renames STM32_SVD.USART.USART2_Periph; USART_3 : STM32_SVD.USART.USART_Peripheral...
------------------------------------------------------------------------------ -- Copyright (c) 2006-2013, Maxim Reznik -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistr...
with Text_File_Scroller; with Texaco; use Texaco; with Message.Post; package body Message.Reader is -- CurrentLine : Line_Position := 0; -- CurrentCurs : Cursor; -- TopLine : Line_Position; -- TermLnth : Line_Position; -- TermWdth : Column_Position; -- BottomLine : Line_Position ; -- Curr_Dir : string ...
with Ada.Text_IO; use Ada.Text_IO; procedure Test is function F(A: integer; A: character) return integer is begin return 0; end; begin New_Line; end;
with Giza; use Giza; with Giza.Colors; use Giza.Colors; with Giza.Widget; with Giza.Widget.Button; use Giza.Widget.Button; with Giza.Types; use Giza.Types; with Ada.Numerics; use Ada.Numerics; with bmp_test_data; package body Test_Graphic_Bounds is ------------- -- On_Init -- ------------- overriding pro...
-- { dg-do compile } -- { dg-options "-O -fstack-check" } package body Stack_Check3 is type Int_Arr is array (1 .. 34) of Integer; type Rec (D : Boolean := False) is record case D is when True => IA : Int_Arr; when False => null; end case; end record; type Rec_Arr is array...
with Ada.Text_Io; procedure Hello_World is begin Ada.Text_Io.Put_Line("Hello world"); end;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
function F(X: Integer; Y: Integer := 0) return Integer; -- Y is optional ... A : Integer := F(12); B : Integer := F(12, 0); -- the same as A C : Integer := F(12, 1); -- something different
with ada.text_io; with ada.strings.fixed; with ada.strings.maps.constants; with ada.strings.unbounded; with numbers; use numbers; package strings is package natural_io is new ada.text_io.integer_io(natural); package unb renames ada.strings.unbounded; package fix renames ada.strings.fixed; procedure print (s ...
------------------------------------------------------------------------------ -- Copyright (c) 2013-2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
-- -- Radoslaw Kowalski 221454 -- package body Rails is protected body Track is function Get_Id return Integer is begin return Id; end Get_Id; function Get_Type return Track_Type is begin return Typee; end Get_Type; entry Get_Lock(Su...
with Ada.Finalization; generic type Key_Type is private; with function "=" (L : Key_Type; R : Key_Type) return Boolean; with function Hash (Key : Key_Type) return Natural; type Value_Type is private; package ACO.Utils.DS.Generic_Table is pragma Preelaborate; type Table (Number_Of_Buckets :...
----------------------------------------------------------------------- -- druss-commands -- Commands available for Druss -- Copyright (C) 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use th...
generic N : Natural; package Discr25_Pkg is type T is private; procedure Proc1 (Set : in out T); private type Obj_T (Size_Max : Natural); type T is access Obj_T; end Discr25_Pkg;
-- MIT License -- -- Copyright (c) 2020 Max Reznik -- -- 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, mo...
with OpenGL.Thin; with System; generic type Element_Type is private; type Index_Type is range <>; type Array_Type is array (Index_Type range <>) of aliased Element_Type; package OpenGL.Buffer_Object is type Buffer_t is new Thin.Unsigned_Integer_t; type Buffer_Array_t is array (Natural range <>) o...
with GL.Buffer.general; pragma Elaborate_All (GL.Buffer.general); with GL.Geometry; with GL.Textures; package GL.Buffer.texture_coords is new GL.Buffer.general (base_object => GL.Buffer.array_Object, index => GL.Geometry.Positive_Vertex_Id, ...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- ...
package Bit_Packed_Array4 is type Data_Type is array (1 .. 39) of Boolean; pragma Pack (Data_Type); for Data_Type'Alignment use 1; type Message_Type is record Valid : Boolean; Data : Data_Type; end record; for Message_Type use record Valid at 0 range 0 .. 0; Data at 0 range...
-- { dg-do compile } pragma Restrictions(No_Elaboration_Code); package Elab3 is type T_List is array (Positive range <>) of Integer; type T_List_Access is access constant T_List; type R is record A : T_List_Access; end record; C : constant R := (A => null); end Elab3;
-------------------------------------------------------------------------------- -- -- -- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. -- -- ...
package body openGL.Conversions is function to_Vector_4 (From : in rgba_Color) return Vector_4 is begin return (Real (to_Primary (From.Primary.Red)), Real (to_Primary (From.Primary.Green)), Real (to_Primary (From.Primary.Blue)), Real (to_Primary (From.Alpha))); ...
package body Archive_Searcher is function Search (Self : in out Object; Search_For : in String) return String is begin return "bar"; end Search; end Archive_Searcher;
-- Autogenerated by Generate, do not edit with System; with Ada.Unchecked_Conversion; private with GL.API.Subprogram_Reference; private with GL.API.Doubles; private with GL.API.Ints; private with GL.API.Shorts; private with GL.API.Singles; private with GL.API.UInts; private with GL.API; procedure GL.Load_Function_Point...
-- PACKAGE E_Rand -- -- Minimal random number generator, mainly for basic test of -- extended arithmetic. -- -- Outputs extended precision pseudo-random numbers on [0.0 .. 1.0) generic package Extended_Real.E_Rand is function Random return E_Real; -- returns E_Reals in [0, 1) procedure Reset (Init...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with Interfaces.C.Pointers; with GL.Low_Level; private with GL.Low_Level.Enums; with GL.Pixels; package GL.Objects.Buffers is pragma Preelaborate; type Buffer_Usage is (Stream_Draw, Stream_Read...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. package Apsepp.Output_Class.Standard is ---------------------------------------------------------------------------- protected type Output_Standard is new Output_Interfa with overriding proced...
with Ada.Text_IO; with Generator.Filtered; procedure Generator_Test is function Square (X : Natural) return Natural is begin return X * X; end Square; function Cube (X : Natural) return Natural is begin return X * X * X; end Cube; G1, G2 : aliased Generator.Generator; F : aliased...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with Ada.Text_Io; use Ada.Text_Io; procedure Mutual_Recursion is function M(N: Natural) return Natural; function F(N: Natural) return Natural; function M(N: Natural) return Natural is (if N = 0 then 0 else N – F(M(N–1))); function F(N: Natural) return Natural is (if N =0 then 1 else N – M(F(...
with Ada.Characters.Handling; function UpperCase (L, R : String) return String is res : String (L'First .. L'Last); begin res := Ada.Characters.Handling.To_Upper (L); return res; end UpperCase;
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with Ada.Strings.Fixed; with Interfaces.C.Strings; with GL.API; with GL.Enums.Getter; with GL.Errors; package body GL.Context is function Major_Version return Int is Result : aliased Int; ...
with lace.Event, lace.Subject, lace.Observer; package chat.Client -- -- Provides an interface to a chat client. -- is pragma remote_Types; type Item is limited interface and lace.Subject .item and lace.Observer.item; type View is access all Item'Class; type View...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Apsepp.Scope_Bound_Locks; use Apsepp.Scope_Bound_Locks; generic type Instance_Ancestor_Type (<>) is abstract tagged limited private; Lock_CB, Unlock_CB : SB_Lock_CB := null; package Apsepp.Generic_Shar...
package body control is procedure Intialize_Controls is begin Configure_PWM_Timer (Selected_Timer'Access, Requested_Frequency); Servo_Control.Attach_PWM_Channel (Selected_Timer'Access, Servo_Channel, LED_For (Servo_Channel), Timer_AF); Servo_Control.Enable_O...
with Ada.Text_IO; use Ada.Text_IO; with Constants; package body List is -- Create a list whose maximum size is specified in Constants package -- Create subprogram to add to list (print a message if the list is full) -- Create subprogram to remove an item from the list -- Create subprogram to print the l...
-- Copyright (c) 2014 onox <denkpadje@gmail.com> -- -- 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 all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND T...
------------------------------------------------------------------------ -- Copyright (C) 2010-2020 by Heisenbug Ltd. (github@heisenbug.eu) -- -- This work is free. You can redistribute it and/or modify it under -- the terms of the Do What The Fuck You Want To Public License, -- Version 2, as published by Sam Hocev...
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package User_Lists.User_Db is type Db_Entry is record First_Name : Unbounded_String; Last_Name : Unbounded_String; Institution : Unbounded_String; end record; end User_Lists.User_Db;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Declarations; with Program.Elements.Defining_Identifiers; with Program.Lexical_Elements; package Program.Elements.Choice_Parameter_Sp...
-- { dg-do compile } with System; procedure Array11 is type Rec is null record; type Index_T is mod System.Memory_Size; type Arr1 is array (1 .. 8) of aliased Rec; -- { dg-warning "padded" } type Arr2 is array (Index_T) of aliased Rec; -- { dg-warning "padded" } A1 : Arr1; A2 : Arr2; begin null; end...
package lace.Any -- -- Provides a base class for 'any' other class. -- Allows for heteroegenous containers. -- Similar, in intent, to the 'void*' of C (for Ada tagged types). -- is pragma Pure; type Item is interface; type limited_Item is limited interface; end lace.Any;
function Median (H : Histogram) return Luminance is From : Luminance := Luminance'First; To : Luminance := Luminance'Last; Left : Pixel_Count := H (From); Right : Pixel_Count := H (To); begin while From /= To loop if Left < Right then From := From + 1; Left := Left + H (F...
-- Copyright (c) 2017 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Ada_LSP.Completions is -------------- -- Document -- -------------- not overriding function Document (...
pragma License (Unrestricted); with Ada.IO_Exceptions; with Ada.IO_Modes; private with Ada.Finalization; private with Ada.Streams.Naked_Stream_IO; package Ada.Streams.Stream_IO is pragma Preelaborate; type Stream_Access is access all Root_Stream_Type'Class; for Stream_Access'Storage_Size use 0; type File_...
-- Institution: Technische Universität München -- Department: Realtime Computer Systems (RCS) -- Project: StratoX -- -- Authors: Emanuel Regnath (emanuel.regnath@tum.de) pragma SPARK_Mode (Off); with STM32.USARTs; with STM32.Device; with HIL.Config; with Ada.Interrupts; use Ada.Interrupts; with Ada.Inte...
-- C34007J.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 float_Math.Algebra.linear.d3; package Impact -- -- Provides 2/3d physics simulations. -- is pragma Pure; package Math renames float_Math; package linear_Algebra_3d renames float_Math.Algebra.linear.d3; BT_LARGE_FLOAT : constant math.Real := 1.0e18; type Any is abstract tagge...
pragma License (Unrestricted); with Ada.Task_Identification; -- with System; package Ada.Execution_Time.Timers is type Timer (T : not null access constant Task_Identification.Task_Id) is tagged limited private; type Timer_Handler is access protected procedure (TM : in out Timer); -- Min_Handler_Ceiling...
-- SPDX-FileCopyrightText: 2020-2021 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Compilation_Units; with Program.Cross_Reference_Updaters; with Program.Elements.Expressions; with Program.Interpretations; with Program.Vi...
-- -- Copyright (C) 2017 Nico Huber <nico.h@gmx.de> -- -- 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 2 of the License, or -- (at your option) any later version. -- -- This pr...
with Ada.Text_IO; use Ada.Text_IO; -- Implement the power exercise in the TD1. procedure puissance is -- Naive version to calculate the power of a given number. function power (x : in Float; n : in Integer) return Float is res : Float; begin res := 1.0; -- Calculate the power. ...
with Ada.Text_IO; use Ada.Text_IO; procedure Szummazas is type Index is new Integer; type Elem is new Integer; type Tomb is array (Index range <>) of Elem; function Szumma ( T: Tomb ) return Elem is S: Elem := 0; begin for I in T'Range loop S := S + T(I); ...
----------------------------------------------------------------------- -- servlet-sessions.factory -- Servlet Sessions factory -- Copyright (C) 2010, 2011, 2012, 2014, 2015, 2016, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (th...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
private with Ada.Containers.Vectors; private with Ada.Direct_IO; private with Ada.Strings.Unbounded; with HAL; use HAL; with HAL.Filesystem; use HAL.Filesystem; -- Simple wrappers around the Ada standard library to provide implementations -- for HAL.Filesystem interfaces. package Native.Filesystem is ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Element_Vectors; with Program.Elements.Associations; with Program.Elements.Expressions; with Program.Lexical_Elements; package Program.Element...
------------------------------------------------------------------------------ -- -- -- Ada User Repository Annex (AURA) -- -- ANNEXI-STRAYLINE Reference Implementation -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
-- 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.text_io, ada.integer_text_io; use ada.text_io, ada.integer_text_io; with multporsumas; procedure prueba_multporsumas is numero, multiplicador, resultado: integer; begin -- Caso de prueba 1: multiplicación estándar numero:=3; multiplicador:=4; put("El resultado de la multiplicacion es 12");...
package Rep_Clause3 is type Record1 is record Page_Handle : Integer range 0 .. 255; Page_Owner : Integer range 0 .. 15; end record; for Record1 use record Page_Handle at 0 range 0 .. 15; Page_Owner at 0 range 16 .. 19; end record; for Record1'Size us...
-- Copyright 2016-2019 NXP -- All rights reserved.SPDX-License-Identifier: BSD-3-Clause -- This spec has been automatically generated from LPC55S6x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NXP_SVD.USBPHY is pragma Preelaborate; ...
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; package SDL_error_h is -- arg-macro: procedure SDL_OutOfMemory () -- SDL_Error(SDL_ENOMEM) -- arg-macro: procedure SDL_Unsupported () -- SDL_Error(SDL_UNSUPPORTED) -- arg-macro: procedu...
generic type T_Data is private; with function Data_Image(Data:T_Data) return String; with function "="(L,R: T_Data) return Boolean; with procedure Delete_Object(Object: T_Data); package lists is Element_not_in_the_list : exception; Get_Index_Value_Outside_the_list : exc...
with Ada.Text_IO; with DOM.Core; procedure Convert (Input : DOM.Core.Node_List; Output : Ada.Text_IO.File_Type);
-- 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...
with Support.CmdLine; use Support.CmdLine; with Support.Strings; use Support.Strings; with Ada.Streams.Stream_IO; with Ada.Directories; package body ADMBase.Data_IO is data_directory : String := read_command_arg ('D',"data/"); results_directory : String := read_command_arg ('O',"results/"); ...
----------------------------------------------------------------------- -- css-commands -- Commands for CSS tools -- Copyright (C) 2018, 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 file ...
with Ada.Text_IO, Pascal; procedure Catalan is Last: Positive := 15; Row: Pascal.Row := Pascal.First_Row(2*Last+1); begin for I in 1 .. Last loop Row := Pascal.Next_Row(Row); Row := Pascal.Next_Row(Row); Ada.Text_IO.Put(Integer'Image(Row(I+1)-Row(I+2))); end loop; end Catalan;
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Debug; use SPARKNaCl.Debug; with SPARKNaCl.MAC; use SPARKNaCl.MAC; with Random; with Interfaces; use Interfaces; with Ada.Numerics.Discrete_Random; procedure Onetimeauth7 is package RB is new Ada.Numerics.Discrete_Random (Byte); package RBI16 is new Ada....
with Simulation; with Ada.Text_IO; use Ada.Text_IO; package body hmc5883l.driver with Refined_State => (State => (buffer, mode)) is procedure initialize is null; function testConnection return Boolean is (True); -- CONFIG_A register function getSampleAveraging return Unsigned_8 is begin -- TOD...
pragma License (Unrestricted); -- runtime unit package System.Unwind.Standard is pragma Preelaborate; -- Standard.Constraint_Error / Numeric_Error (s-stalib.ads) Constraint_Error_Name : aliased constant String (1 .. 17) := "CONSTRAINT_ERROR" & Character'Val (0); Constraint_Error : aliased constant ...
-- public domain with Ada.Calendar; with Ada.Characters.Latin_1; with Ada.Strings.Maps.Constants; with Ada.Strings.Maps; with Ada.Strings.Fixed; with Ada.Text_IO; with Interfaces; package body String_Ops is use type Interfaces.Unsigned_32; use type Ada.Strings.Maps.Character_Set; Hex_Conversion : constant a...
pragma Ada_2012; with AUnit.Assertions; use AUnit.Assertions; with AUnit.Test_Caller; with Ada.Streams; use Ada.Streams; with SHA2; package body SHA2_Streams_Tests is package Caller is new AUnit.Test_Caller (Fixture); Test_Suite : aliased AUnit.Test_Suites.Test_Suite; function Suite return AUnit.Test_Suit...
------------------------------------------------------------------------------ -- -- -- Giza -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT SYSTEM UTILITIES -- -- -- -- ...
package body Lto9_Pkg2 is procedure Put (List : in out List_Type; Elem_Ptr : in Element_Ptr; Location : in Index) is begin List.Elements(Location) := Elem_Ptr; end Put; end Lto9_Pkg2;
package def_monitor is protected type Monitor is entry menjar; entry fer_menjar; entry passetjada; entry treballar_mina; private cadires : Integer := 4; menjades : Integer := 2; assegut : Boolean := false; servit : Boolean := false; end Monitor; end def_monitor;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
with player; use player; package save_load_game is procedure newGame(player: out Player_Type; dungeon: out Integer); procedure saveGame(player: in Player_Type; dungeon: in Integer; fileNum: in Integer); procedure loadGame(player: in out Player_Type; dungeon: in out Integer; fileNum: in Integer); end sa...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
-- 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...
package GLOBE_3D.Portals is -- Methods provided for clipping through screen rectangles procedure Intersect (A, B : Rectangle; C : out Rectangle; non_empty : out Boolean); procedure Find_bounding_box ( o : Object_3D'Class; face : Positive; b : out Rectangle; succ...
Pragma Ada_2012; Pragma Wide_Character_Encoding( UTF8 ); with Ada.Characters.Handling; -- Ada.Containers.Indefinite_Vectors; Package Risi_Script.Types.Identifier is SubType Identifier is String with Dynamic_Predicate => Is_Valid( Identifier ) or else raise Parse_Error with "Invalid identifier: """ & Iden...
-- The Cupcake GUI Toolkit -- (c) Kristian Klomsten Skordal 2012 <kristian.skordal@gmail.com> -- Report bugs and issues on <http://github.com/skordal/cupcake/issues> -- vim:ts=3:sw=3:et:si:sta package Cupcake is -- Cupcake version: VERSION_MAJOR : constant := 0; VERSION_MINOR : constant := 1; V...
with Selection; with Ada.Text_IO; procedure Main is Arr: Selection.Arr (0 .. 3) := (5, 8, 6, 2); begin for I in Arr'Range loop Ada.Text_IO.Put_Line(Arr (I)'Image); end loop; Selection.Sort(Arr); Ada.Text_IO.Put_Line("Sorted:"); for I in Arr'Range loop Ada.Text_IO.Put_Line(Arr (I)'Image); end l...
-- Institution: Technische Universitaet Muenchen -- Department: Realtime Computer Systems (RCS) -- Project: StratoX -- Author: Martin Becker (becker@rcs.ei.tum.de) with Interfaces; with HIL; -- @summary -- Implements a serialization of log objects (records, -- string messages, etc.) according to the self-d...
pragma Ada_2012; with Bits; with BitOperations.Search.Axiom; with BitOperations.Search.Axiom.Most_Significant_Bit; package body TLSF.Block.Types with SPARK_Mode, Pure, Preelaborate is package Bits_Size is new Bits(Size_Bits); use Bits_Size; function To_Size_Bits (S : Size) return Size_Bits is Result :...
-- -- Basic test : splitting a sentence into words -- with Ada.Text_IO; use Ada.Text_IO; with AdaPcre; use AdaPcre; procedure Test_0 is procedure Search_For_Pattern (Compiled_Expression : in AdaPcre.Pcre_Type; Search_In : in String; Offset : in Natural; First, Last...
generic Crate_Name : String; -- MANDATORY: Name of the crate/project in lower case. Resource_Dir_From_Prefix : String := "share/" & Crate_Name & "/"; -- OPTIONAL: Relative path from the prefix/installation dir to the resource -- folder. The default value provided here should work for all cases. M...
with AUnit.Reporter.Text; with AUnit.Run; with AUnit.Test_Suites; with Test_Standard; with Test_URLSafe; procedure Base64_Tests is function Suite return AUnit.Test_Suites.Access_Test_Suite; function Suite return AUnit.Test_Suites.Access_Test_Suite is Result : constant AUnit.Test_Suites.Access_Test_Suite ...