content stringlengths 23 1.05M |
|---|
with Ada.Text_IO;
procedure Reproduce is
type String_T is new String;
function "+" (Left : String) return String_T is (String_T(Left));
function "+" (Left : String_T; Right : String) return String_T is (String_T(String (Left) & Right));
generic
Description : String_T;
package Generic_G is
procedure ... |
-- SPDX-FileCopyrightText: 2022 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Regions.Contexts.Environments.Package_Nodes;
package body Regions.Contexts.Environments.Nodes is
type Entity_Access is access all Regions.Entities... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2013 Felix Krause <contact@flyx.org>
--
-- 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/licen... |
-----------------------------------------------------------------------
-- 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... |
generic
-- low: integer; --lowerbound of stack
--up: integer; -- upperbound of stack
max: integer;
type item is private; -- type of stack
package gstack is
procedure tpush(x: in item);
procedure tpop(x: out item);
procedure spush(x: in item);
procedure spop(x: out item);
function spa... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Containers.Hashed_Maps;
package body Coroutines.Polling is
use type Interfaces.C.int;
function epoll_create1
(F... |
With
System.Storage_Elements,
Risi_Script.Types.Implementation.Creators,
Risi_Script.Types.Internals,
Ada.Containers,
Ada.Strings.Unbounded,
Ada.Strings.Fixed;
Separate(Risi_Script.Types.Implementation)
Package Body Conversions is
Use Risi_Script.Types.Implementation.Creators;
Use Type Ada.Containers.Count_Type... |
-- Institution: Technische Universität München
-- Department: Realtime Computer Systems (RCS)
-- Project: StratoX
--
-- Authors: Emanuel Regnath (emanuel.regnath@tum.de)
with HIL.Devices;
-- @summary
-- Target-independent specification for HIL of I2C
package HIL.I2C with SPARK_Mode => On is
-- type... |
pragma License (Unrestricted);
-- specialized for Windows
private with System.Interrupt_Numbers;
package Ada.Interrupts.Names is
-- This package is system-specific.
SIGINT : constant Interrupt_Id;
SIGILL : constant Interrupt_Id;
SIGABRT_COMPAT : constant Interrupt_Id;
SIGFPE : constant Interrupt_Id;
... |
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr>
-- MIT license. Please refer to the LICENSE file.
private with Apsepp.Generic_Shared_Instance;
with Apsepp.Scope_Bound_Locks; use Apsepp.Scope_Bound_Locks;
generic
type Fixture_Type is tagged limited private;
type Fixture_Type_Access is not null access all... |
with copia_examenes;
use copia_examenes;
procedure rellenar_aula_1 (Aula_1: out T_Aula) is
begin
--Rellenar el aula_1 fila 1
-------------------------------
aula_1(1,1).Ocupada:=True;
Aula_1(1,1).Ident:=111;
Aula_1(1,1).Ex.Num_palabras_diferentes:=5;
--rellenando_las palabras y sus frecuencias
... |
with foo; use foo;
with Interfaces; use Interfaces;
-- GNATprove GPL 2016 seems to miss a failed precondition check
-- in the call at line 18. Reason is insufficient knowledge on
-- others=>, causing a false negative there, which in turn hides
-- a serious bug.
-- Fixed in GNATprove Pro 18 (and presumably later i... |
-- Body of package Scaliger
----------------------------------------------------------------------------
-- Copyright Miletus 2015
-- 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 r... |
with Ada.Text_IO, Mod_Inv;
procedure Chin_Rema is
N: array(Positive range <>) of Positive := (3, 5, 7);
A: array(Positive range <>) of Positive := (2, 3, 2);
Tmp: Positive;
Prod: Positive := 1;
Sum: Natural := 0;
begin
for I in N'Range loop
Prod := Prod * N(I);
end loop;
for I in A'Rang... |
-------------------------------------------------------------------------
-- GL.Errors - error support sub - programs.
--
-- Copyright (c) Rod Kay 2007
-- AUSTRALIA
-- Permission granted to use this software, without any warranty,
-- for any purpose, provided this copyright note remains attached
-- ... |
with OpenAL.Types;
package OpenAL.Listener is
--
-- API
--
--
-- Position
--
-- proc_map : alListener3f
procedure Set_Position_Float
(X : in Types.Float_t;
Y : in Types.Float_t;
Z : in Types.Float_t);
-- proc_map : alListener3i
procedure Set_Position_Discrete
(X : in Types.Int... |
-- C48009F.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... |
type Days is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday);
Today : Days;
case Today is
when Saturday | Sunday =>
null;
when Monday =>
Compute_Starting_Balance;
when Friday =>
Compute_Ending_Balance;
when others =>
Accumulate_Sales;
end case;
|
-- { dg-do run }
-- { dg-options "-O2" }
-- This is an optimization test and its failure is only a missed optimization.
-- For technical reasons it cannot pass with SJLJ exceptions.
with Raise_From_Pure; use Raise_From_Pure;
procedure test_raise_from_pure is
K : Integer;
begin
K := Raise_CE_If_0 (0);
end;
|
-----------------------------------------------------------------------
-- components-widgets-tabs -- Tab views and tabs
-- Copyright (C) 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 file... |
pragma Ada_2012;
with Ada.Text_IO; use Ada.Text_IO;
with EU_Projects.Nodes.Partners;
with EU_Projects.Nodes.Action_Nodes.WPs;
with EU_Projects.Nodes.Action_Nodes.Tasks;
with Project_Processor.Processors.Processor_Tables;
with EU_Projects.Times;
package body Project_Processor.Processors.Dumping is
use EU_Projects.... |
-- Shoot'n'loot
-- Copyright (c) 2020 Fabien Chouteau
with HAL; use HAL;
with Levels;
with Player;
with Render;
with Monsters;
with Chests;
with Score_Display;
with Sound;
with PyGamer.Controls;
use PyGamer;
with GESTE_Config; use GESTE_Config;
with GESTE;
with GESTE.Tile_Bank;
with GESTE.Grid;
with Game_Assets;... |
------------------------------------------------------------------------------
-- --
-- tiled-code-gen --
-- --
-- ... |
-- 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... |
-- Copyright 2016,2017 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 ... |
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ... |
package gel.Remote
--
-- Provides a namespace for remote GEL classes.
--
is
pragma Pure;
end gel.Remote;
|
with Ada.Text_IO; use Ada.Text_IO;
with hetro_stack;
with hetro_stack_elems; use hetro_stack_elems;
with Ada.Calendar; use Ada.Calendar;
procedure driver is
package IIO is new Ada.Text_IO.Integer_IO(Integer); use IIO;
-- Will Satisfy Formal Parameter for generic instatntiation.
-- Vehicle'Class will allow this to... |
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32H743x.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.OPAMP is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype OPAMP1_CSR_VP_SEL_Field is HAL.UInt... |
-- This spec has been automatically generated from STM32L5x2.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.GTZC is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- MPCBB control register
... |
-- 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-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
with League.String_Vectors;
with League.JSON.Objects;
with League.JSON.Values;
with Jupyter.Kernels;
procedure Magics.Gprbuild_Options
(IO_Pub : not... |
-- UnZip.Decompress.Huffman
---------------------------
-- Huffman tree generation and deletion.
-- Originally from info - zip's unzip, data structure rewritten by G. de Montmollin
private package UnZip.Decompress.Huffman is
type HufT_table;
type p_HufT_table is access HufT_table;
type HufT is rec... |
-- { dg-do compile }
-- { dg-options "-gnatws" }
with System.Storage_Elements; use System.Storage_Elements;
with Unchecked_Conversion;
with Slice7_Pkg; use Slice7_Pkg;
procedure Slice7 is
type Discrete_Type is range 1 .. 32;
Max_Byte_Count : constant := 4;
subtype Byte_Count_Type is Storage_Offset range 1..Ma... |
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- ... |
------------------------------------------------------------------------------
-- --
-- Simple HTTP --
-- --
-- ... |
-- AD7203B.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... |
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
--
-- Copyright (c) 2015, John Leimon <jleimon@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 ... |
with BDD.Asserts; use BDD.Asserts;
package body RTCH.Colours.Steps is
procedure Given_Colour_C (Red, Green, Blue : Float) is
begin
C := Make_Colour (Red, Green, Blue);
end Given_Colour_C;
procedure Then_C_Red_Is (Red : Float) is
begin
Assert (C.Red = Red);
end Then_C_Red_Is;
procedu... |
with Ada.Text_IO; use Ada.Text_IO;
procedure 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 .. Fri;
-- Declaring a fixed-size array
Where... |
with Licensing_Raw;
package Licensing with Preelaborate is
type Licenses is new Licensing_Raw.Licenses;
end Licensing;
|
procedure Exit_Statement is
begin
Loop_1 : loop
exit;
exit when True;
exit Loop_1;
end loop Loop_1;
end Exit_Statement;
|
with Ada.Text_IO; use Ada.Text_IO;
procedure Long_Division is
package Int_IO is new Ada.Text_IO.Integer_IO (Integer);
use Int_IO;
type Degrees is range -1 .. Integer'Last;
subtype Valid_Degrees is Degrees range 0 .. Degrees'Last;
type Polynom is array (Valid_Degrees range <>) of Integer;
function D... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- { dg-do run }
procedure BIP_Aggregate_Bug is
package Limited_Types is
type Lim_Tagged is tagged limited record
Root_Comp : Integer;
end record;
type Lim_Ext is new Lim_Tagged with record
Ext_Comp : Integer;
end record;
function Func_Lim_Tagged (Choice : Intege... |
with Libadalang.Analysis; use Libadalang.Analysis;
with Rejuvenation.Navigation; use Rejuvenation.Navigation;
with Rewriters; use Rewriters;
package Rewriters_Minimal_Parentheses is
type Rewriter_Minimal_Parentheses is new Rewriter with private;
overriding function Rewrite
(RMP : R... |
-- { dg-do run }
with Init9; use Init9;
with Ada.Numerics; use Ada.Numerics;
with Text_IO; use Text_IO;
with Dump;
procedure T9 is
Local_R1 : R1;
Local_R2 : R2;
begin
Local_R1.F := My_R1.F + 1.0;
Put ("Local_R1 :");
Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "L... |
pragma SPARK_Mode;
with Sparkduino; use Sparkduino;
with Types; use Types;
package body Zumo_Pushbutton is
Zumo_Button : constant := 12;
Zumo_Button_Pullup : constant PinMode := INPUT_PULLUP;
Zumo_Button_Default_Pinval : constant DigPinValue := HIGH;
procedure Init
is
begin
Initd := True;
... |
-- 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;
with Program.Elements.Expressions;
package P... |
with NRF52_DK.Time; use NRF52_DK.Time;
with HAL; use HAL;
package body sensor is
function Distance(TrigPin, EchoPin : NRF52_DK.IOs.Pin_Id) return Float is
TimeNow : Time_Ms;
--Maximum distance of sensor is 400cm = 23200uS. We add a 1ms margin on top of that
DeadlineMicroseconds : constant Inte... |
-- Based on AdaCore's Ada Drivers Library,
-- see https://github.com/AdaCore/Ada_Drivers_Library,
-- checkout 93b5f269341f970698af18f9182fac82a0be66c3.
-- Copyright (C) Adacore
--
-- Institution: Technische Universität München
-- Department: Real-Time Computer Systems (RCS)
-- Project: StratoX
-- Authors: ... |
-- Package: Semaphores
package Semaphores is
protected type CountingSemaphore(Max: Natural; Initial: Natural) is
entry Wait;
entry Signal;
private
Count : Natural := Initial; --number of keys available
MaxCount : Natural := Max; --total number of keys
end CountingSemaphore;
end S... |
------------------------------------------------------------------------------
-- Copyright (c) 2013-2015, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
-- Institution: Technische Universitaet Muenchen
-- Department: Realtime Computer Systems (RCS)
-- Project: StratoX
-- Author: Martin Becker (becker@rcs.ei.tum.de)
--
with Ada.Tags;
package body ULog.Identifiers is
procedure Register (The_Tag : Ada.Tags.Tag; Code : Character) is
begin
null;
... |
-- Lua.Util
-- Utility routines to go with the Ada 2012 Lua interface
-- Copyright (c) 2015, James Humphry - see LICENSE for terms
package Lua.Util is
-- Print the stack out to the console
procedure Print_Stack(L : in Lua_State'Class);
end Lua.Util;
|
-- --
-- package Copyright (c) Dmitry A. Kazakov --
-- Parsers.Generic_Source Luebeck --
-- Interface Winter, 2004 --
-- ... |
-- $Header: /cf/ua/arcadia/alex-ayacc/ayacc/src/RCS/ayacc_separates.a,v 1.1 88/08/08 12:07:39 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... |
-------------------------------------------------------------------------------
-- 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 withou... |
with Ada.Numerics.Generic_Elementary_Functions;
package body Simple_Math is
package Math is new Ada.Numerics.Generic_Elementary_Functions (Float_T);
-- Sqrt should raise our exception when X < 0 and
-- the square root of X otherwise
function Sqrt
(X : Float_T)
return Float_T is
begin
re... |
with Ada.Containers.Vectors;
with Parser; use Parser;
package X86Parser is
type Instr is record
size : integer;
line : Parts;
end record;
package Instr_Vector is new Ada.Containers.Vectors
( Index_Type => Natural,
Element_Type => Instr );
use Instr_Vector;
... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
-- { dg-do compile }
-- { dg-options "-O" }
with Ada.Containers.Ordered_Sets;
with Ada.Strings.Unbounded;
procedure Opt33 is
type Rec is record
Name : Ada.Strings.Unbounded.Unbounded_String;
end record;
function "<" (Left : Rec; Right : Rec) return Boolean;
package My_Ordered_Sets is new Ada.Cont... |
with
bullet_physics.Space,
box2d_physics .Space;
package body physics.Forge
is
----------
--- Space
--
function new_Space (Kind : in space_Kind) return Space.view
is
Self : Space.view;
begin
case Kind
is
when Bullet =>
Self := Space.view' (new bullet_... |
with Ada.Numerics.Big_Numbers.Big_Integers;
use Ada.Numerics.Big_Numbers.Big_Integers;
package Fibonacci is
function Fib_Iter (N : Natural) return Big_Natural;
function Fib_Naive (N : Natural) return Natural;
function Fib_Recur (N : Natural) return Big_Natural;
function Big_Natural_Image (N : Big_Natural... |
-- Generic spec for Audio drivers
-- /!\ This is work in progress and not at a real Hardware Abstraction Layer
with Ada.Interrupts.Names;
with Interfaces; use Interfaces;
with STM32.DMA;
package HAL.Audio is
Audio_Out_DMA_Interrupt : Ada.Interrupts.Interrupt_ID renames
Ada.Inter... |
-- { dg-do compile }
-- { dg-options "-gnatws" }
-- { dg-options "-gnatws -flto" { target lto } }
with Lto3_Pkg1;
package Lto3 is
package P is new Lto3_Pkg1 (Id_T => Natural);
end Lto3;
|
--
-- \brief AUnit test program
-- \author Alexander Senier
-- \date 2019-01-03
--
with GNAT.IO;
with AUnit;
procedure Main is
use GNAT.IO;
begin
Put_Line ("No AUnit test, yet.");
end Main;
|
with Ada.Calendar; use Ada.Calendar;
with Ada.Text_Io; use Ada.Text_Io;
with Sigint_Handler; use Sigint_Handler;
procedure Signals is
task Counter is
entry Stop;
end Counter;
task body Counter is
Current_Count : Natural := 0;
begin
loop
select
accept Stop;
... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
package Gm_Unit_Rank_Types is
-- This type defines an extended numeric ranking. 0 indicates no
-- rank, 1 is the highest rank and 99 is the lowest rank.
--
subtype Extended_Numeric_Rank_Type is Integer range 0 .. 99;
-- The following constant defines the value returned when a given
-- object is not des... |
with Protypo.Api.Engine_Values.Handlers;
with Protypo.Api.Engine_Values.Parameter_Lists;
with Ada.Tags;
private package Protypo.Code_Trees.Interpreter.String_Interpolation_Handlers is
use type Ada.Tags.Tag;
type String_Interpolator is
new Handlers.Function_Interface
with
private;
function ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- Copyright (c) 2013-2016, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
private
package Protypo.Code_Trees.Interpreter.Statements is
procedure Run (Status : Interpreter_Access;
Program : not null Node_Access)
with
Pre => Program.Class in Statement_Classes;
procedure Run (Status : Interpreter_Access;
Program : Node_Vectors.Vector);... |
------------------------------------------------------------------------------
-- --
-- Common UUID Handling Package --
-- - RFC 4122 Implementation - --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
procedure Challenge_399_Easy is
function Letter_Sum( A : String ) return Integer is
Base : constant Integer := (Character'pos('a') - 1);
Sum : Integer := 0;
begin
for I in A'Range loop
Sum := Sum + Character'pos(A(I)) - Base;
end l... |
-- { dg-do compile }
package Atomic2 is
type Rec1 is record
C : Character;
I : Integer;
pragma Atomic (I);
end record;
for Rec1 use record
C at 0 range 0 .. 7;
I at 1 range 0 .. 31; -- { dg-error "position of atomic field" }
end record;
type Rec2 is record
C : Character;
I : Int... |
with C.signal;
package body System.Interrupt_Management.Operations is
use type C.signed_int;
procedure Set_Interrupt_Mask (Mask : access Interrupt_Mask) is
begin
Set_Interrupt_Mask (Mask => Mask, OMask => null);
end Set_Interrupt_Mask;
procedure Set_Interrupt_Mask (
Mask : access Interrupt... |
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Rule; use Rule;
package Planet is
package SU renames Ada.Strings.Unbounded;
package Origin_Define is
type Object is tagged private;
function Build (name : String;
colony : Integer;
stars... |
with Date_Package; use Date_Package;
package Person_Handling is
type Person is private;
function "="(Person1, Person2: in Person) return Boolean;
function ">"(Person1, Person2: in Person) return Boolean;
function "<"(Person1, Person2: in Person) return Boolean;
procedure Put(Pers: in Person);... |
package body Q_CSV is
--==================================================================
function F_LINE (V_LINE : String;
V_SEPARATOR : Character := ';') return T_ROW is
(V_LENGTH => V_LINE'LENGTH,
R_STR => V_LINE,
R_FIRST => V_LINE'FIRST,
R_LAST => V_... |
-- sarge.ads - Specification file for the Sarge command line argument parser project.
-- Revision 0
-- Notes:
-- -
-- 2019/04/10, Maya Posch
with Ada.Strings
use Ada.Strings
with Ada.Containers.Vectors;
with Ada.Containers.Indefinite_Ordered_Maps;
use Ada.Containers;
package Sarge is
type Argument is r... |
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
with Glfw.API;
with Glfw.Enums;
package body Glfw.Events.Mouse is
function Pressed (Query : Button) return Boolean is
begin
return API.Get_Mouse_Button (Query) = Events.Press;
end Press... |
--
-- Copyright (C) 2021 Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: BSD-3-Clause
--
package body HT16K33 is
procedure Initialize
(This : in out Device)
is
Oscillator_On : constant I2C_Data (1 .. 1) := (1 => 16#21#);
Display_On : constant I2C_Data (1 .. 1) := (1 => 16#8... |
-----------------------------------------------------------------------
-- gen-commands-project -- Project creation command for dynamo
-- Copyright (C) 2011, 2012, 2013, 2014 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License"... |
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- ... |
-- C97113A.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.Integer_Text_IO;
with Ada.Text_IO;
package body Problem_08 is
package IO renames Ada.Text_IO;
package I_IO renames Ada.Integer_Text_IO;
procedure Solve is
Big_Num : constant String :=
"73167176531330624919225119674426574742355349194934"
&"9698352031277450632623957831801698480186... |
-- Package to provide device-specific information.
package Device is
-- Supported devices.
type Device_Type is (
ASIC,
Virtex_4,
Virtex_5,
Virtex_6,
Virtex_7
);
Invalid_Device : exception;
-- Set the device to use.
procedure Set_Device(name : in String);
-- Set th... |
package Mult with SPARK_Mode is
function Mult (A : Natural; B : Natural) return Natural with
SPARK_Mode,
Pre => A < 32768 and B < 32768,
Post => Mult'Result = A * B;
end Mult;
|
-- Taken from altivec of GNAT examples (http://www.adacore.com/developers/code-samples/gnat-examples/)
-- ====================================================================================================
-- This example shows how to create and manipulate vectors by the mean of high
-- level views.
with GNAT.Alt... |
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package Program.Scanner_States is
pragma Pure;
type State is mod +86;
subtype Looping_State is State range 0 .. 63;
subtype Final_State is Stat... |
with Ada.Containers.Hashed_Maps;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Hash;
-- Basic support for .env files in Ada everyone was waiting for
package Aids.Env is
Syntax_Error : exception;
package Env_Hashed_Map is new Ada.Containers.Hashed_Maps
(Key_Type => U... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
package aIDE.Palette
is
type Item is abstract tagged private;
type View is access all Item'Class;
private
type Item is abstract tagged
record
null;
end record;
procedure dummy;
end aIDE.Palette;
|
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
package bits_types_struct_tm_h is
-- ISO C `broken-down time' structure.
-- Seconds. [0-60] (1 leap second)
type tm is record
tm_sec : aliased int; -- /usr/include/bits/types/struct_tm.h:9
... |
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C;
use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C;
procedure euler27 is
type stringptr is access all char_array;
procedure PString(s : stringptr) is
begin
String'Write (Text_Streams.S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.