content stringlengths 23 1.05M |
|---|
with Ada.Text_IO;
with Ada.Strings.Unbounded;
with ada.Text_IO.Unbounded_IO;
procedure Report is
User_Input : Ada.Strings.Unbounded.Unbounded_String;
use Ada.Text_IO;
F : File_Type;
begin
Put_Line ("Please enter your report: ");
User_Input := ada.Text_IO.Unbounded_IO.Get_Line;
Create (F, Out_f... |
-- { dg-do compile }
-- { dg-options "-O2" }
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Interfaces; use Interfaces;
package Opt2 is
type Arr is array (Unsigned_32 range <>) of Unbounded_String;
end Opt2;
|
------------------------------------------------------------------------------
-- Copyright (c) 2015, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
with Ada.Containers.Vectors; use Ada.Containers;
with Ada.Finalization; use Ada.Finalization;
with Benchmark; use Benchmark;
with Memory; use Memory;
package Benchmark_Runner is
type Runner_Type is new Limited_Controlled with private;
procedure Register_Benchmark(runner ... |
-- Copyright (c) 2017 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Streams;
with Ada.Characters.Wide_Wide_Latin_1;
with League.Stream_Element_Vectors;
with League.Strings;
with League.Text_Cod... |
with
Shell.Commands,
Ada.Environment_Variables,
Ada.Text_IO;
procedure Test_Environment
is
use Ada.Text_IO;
begin
Put_Line ("Begin 'Test_Environment' tests.");
New_Line (2);
Test_1:
declare
Name : constant String := "aShell_Test_Variable";
Value : constant String := "... |
-- ----------------------------------------------------------------- --
-- AdaSDL --
-- Binding to Simple Direct Media Layer --
-- Copyright (C) 2001 A.M.F.Vargas --
-- Antonio M. F.... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
pragma Ada_2012;
package body Line_Parsers.Receivers.Enumeration_Receivers is
-------------
-- Receive --
-------------
procedure Receive
(Handler : in out Receiver_Type;
Name : String;
Value : String;
Position : Natural)
is
pragma Unreferenced (Name... |
with Tkmrpc.Types;
package Tkmrpc.Contexts.ae
is
type ae_State_Type is
(clean,
-- Initial clean state.
invalid,
-- Error state.
stale,
-- AE context is stale.
unauth,
-- AE context is unauthenticated.
loc_auth,
-- Local identity of AE is aut... |
-- Copyright 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 or agr... |
-- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
... |
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- ... |
package body Sender is
task body SenderTask is
tmpMessage: pMessage;
subtype RangeK is Natural range 1..k;
begin
for I in RangeK'Range loop
tmpMessage := new Message'(content => I, health => h);
firstNode.all.nodeTask.all.SendMessage(tmpMessage);
end loo... |
-----------------------------------------------------------------------
-- package body e_Derivs, high-order automatic differentiation of functions
-- Copyright (C) 2008-2018 Jonathan S. Parker
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby gran... |
with Ada.Text_IO, Generic_Inverted_Index, Ada.Strings.Hash, Parse_Lines;
use Ada.Text_IO;
procedure Inverted_Index is
type Process_Word is access procedure (Word: String);
package Inv_Idx is new Generic_Inverted_Index
(Source_Type => String,
Item_Type => String,
Hash => Ada.Strings.Ha... |
-- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
with Yaml.Transformator;
with Yaml.Stream_Concept;
private with Ada.Containers.Indefinite_Vectors;
generic
with package Stream_Impl is new Stream_Concept (<>);
package Yaml.Transformation is
ty... |
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO; use Ada.Text_IO;
with Text_IO.Unbounded_IO; use Text_IO.Unbounded_IO;
-- Temporär, ta bort när den inte behövs längre
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Lab6 is
Input, Output : File_Type;
I: Integer;
WasLastTab: Int... |
-----------------------------------------------------------------------
-- bkp-stores-local -- Store management for local files
-- Copyright (C) 2014, 2015, 2016 Stephane.Carrez
-- Written by Stephane.Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you ma... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
with kv.avm.Registers;
package kv.avm.Symbol_Tables is
Missing_Element_Error : exception;
type Symbol_Table is tagged limited private;
type Symbol_Table_Access is access all Symbol_Table;
procedure Initialize
(Self : in out Symbol_Table);
function Count(Self : Symbol_Table) return Natural;
... |
-- -*- Mode: Ada -*-
-- Filename : tokenize.ads
-- Description : Ruby-like split
-- Author : Finta Tartaruga
-- Created On : Tue Sep 11 22:05:53 2007
-- Last Modified By: R. Bernardini
-- Last Modified On: November 14, 2007
-- Update Count : 1
-- Status ... |
-- This file is generated by SWIG. Please do *not* modify by hand.
--
with Interfaces.C;
package c_math_c.Pointers is
-- Real_Pointer
--
type Real_Pointer is access all c_math_c.Real;
-- Real_Pointers
--
type Real_Pointers is
array
(Interfaces.C
.size_t range <>) of aliased c_... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2018 - 2019 Joakim Strandberg <joakim@mequinox.se>
--
-- 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.ap... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
procedure File_Exists is
function Does_File_Exist (Name : String) return Boolean is
The_File : Ada.Text_IO.File_Type;
begin
Open (The_File, In_File, Name);
Close (The_File);
return True;
exception
when Name_Error =>
return False;
end... |
package body Timecards is
function Create
(Name : String;
Rate : Employee_Data.Hourly_Rate_T;
Hours : Hours_Worked_T)
return Timecard_T is
begin
return Timecard_T'(others => <>);
end Create;
function Id
(Timecard : Timecard_T)
return Employee_Data.Id_T is
begin... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-- The Village of Vampire by YT, このソースコードはNYSLです
with Serialization;
package Tabula.Casts.Cast_IO is
Yaml_Type : constant String := "vampire-cast";
package Neutralable_Sex_IO is
new Serialization.IO_Enumeration (Neutralable_Sex);
package Person_Sex_IO is new Serialization.IO_Enumeration (Person_Sex);
proced... |
-----------------------------------------------------------------------
-- openapi-streams -- Stream operations
-- Copyright (C) 2017, 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 ex... |
-----------------------------------------------------------------------
-- babel-streams-files -- Local file stream management
-- Copyright (C) 2014, 2015, 2016 Stephane.Carrez
-- Written by Stephane.Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may... |
generic
package Abstract_Private is
type T1 is abstract tagged private;
procedure P1 (X : T1) is abstract;
type T2 is abstract tagged private;
private
type T1 is abstract tagged null record;
procedure P2 (X : T1) is abstract; -- { dg-error "must be visible" }
type T2 is abstract new T1 with null ... |
-- Copyright (c) 2017 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Streams.Stream_IO;
with Ada.Containers.Hashed_Maps;
with League.JSON.Arrays;
with League.JSON.Documents;
with League.JSON.Ob... |
with GL.Types; use GL.Types;
with C3GA;
with E3GA;
with Multivectors;
package Points is
use Multivectors;
use C3GA;
type Normalized_Points_Array is array (int range <>) of Normalized_Point;
Num_Points : constant Int := 6;
Point_Data : constant Vector_E3_Array (1 .. Num_Points) :=
... |
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Calendar;
with Ada.Containers;
with Ada.Containers.Bounded_Ordered_Maps;
with GNAT.Sockets;
with League.Strings;
with Torr... |
-- C58005H.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.
-- Unlimite... |
pragma License (Unrestricted);
-- extended unit
package Ada.Containers.Composites is
-- There are tiny generic functions for ease to make comparator or more.
pragma Pure;
-- comparators
generic
type Element_Type (<>) is limited private;
with function "<" (Left, Right : Element_Type) return ... |
-- Copyright 2015,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 ... |
-- Display_NORX_Traces
-- A utility to display traces of the encryption process for the test vectors
-- suggested in Appendix A of the NORX specification
-- Copyright (c) 2016, James Humphry - see LICENSE file for details
with Ada.Text_IO;
use Ada.Text_IO;
with System.Storage_Elements;
use System.Storage_Elements;
w... |
with Ada.Containers.Array_Sorting;
with System.Long_Long_Integer_Types;
package body Ada.Containers.Generic_Array_Types is
subtype Word_Integer is System.Long_Long_Integer_Types.Word_Integer;
-- implementation
function Length (Container : Array_Type) return Count_Type is
begin
-- diff
-- diff
-- diff... |
with Ada.Text_IO; use Ada.Text_IO;
procedure Test is
type T;
procedure P is begin New_Line; end;
type T is record A: Integer; end record;
begin
New_Line;
end;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
with
Interfaces.C.Strings,
System,
FLTK.Images.RGB;
use type
Interfaces.C.int,
Interfaces.C.unsigned,
Interfaces.C.Strings.chars_ptr,
System.Address;
package body FLTK.Widgets.Groups.Windows is
procedure window_set_draw_hook
(W, D : in System.Address);
pragma Impo... |
with Ada.Strings.Maps.Constants;
with Ada.Strings.Unbounded;
with Ada.Strings.Equal_Case_Insensitive;
with Ada.Strings.Less_Case_Insensitive;
package Protypo is
use Ada;
use type Ada.Strings.Maps.Character_Set;
Run_Time_Error : exception;
Parsing_Error : exception;
Begin_Id_Set : constant Strings... |
-- { dg-do compile }
-- { dg-options "-g" }
package VFA1 is
type Rec is record
A : Short_Integer;
B : Short_Integer;
end record;
type Rec_VFA is new Rec;
pragma Volatile_Full_Access (Rec_VFA);
end VFA1;
|
package body agar.gui.widget.titlebar is
package cbinds is
end cbinds;
end agar.gui.widget.titlebar;
|
pragma License (Unrestricted);
-- extended unit
package Ada.Streams.Stream_IO.Pipes is
-- Creating pipe.
procedure Create (Reading, Writing : out File_Type);
end Ada.Streams.Stream_IO.Pipes;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
with Units; use Units;
package Infrastructure is
type Steering;
type Steering_ptr is access Steering;
protected type Steering is
entry SetNumber(CorrectNumber: in SteeringNumber);
entry Incoming(CurrentTram: in TramNumber);
entry Leaving;
entry CheckStatus;
private
Currentl... |
-- Project: StratoX
-- System: Stratosphere Balloon Flight Controller
-- Author: Martin Becker (becker@rcs.ei.tum.de)
with Profiler;
with Ada.Real_Time; use Ada.Real_Time;
with Logger;
with Units;
with FAT_Filesystem; use FAT_Filesystem;
with FAT_Filesystem.Directories; use FAT_Filesystem.D... |
with
gel.Forge,
gel.Window.setup,
gel.Applet.gui_world,
gel.World,
gel.Camera,
gel.Sprite,
ada.Calendar;
pragma Unreferenced (gel.Window.setup);
procedure launch_add_rid_sprite_Test
--
-- drops a ball onto a box terrain.
--
--
is
use ada.Calendar;
the_Applet : constant gel.... |
pragma Style_Checks ("NM32766");
---------------------------------------------------
-- This file has been generated automatically from
-- cbsg.idl
-- by IAC (IDL to Ada Compiler) 19.0w (rev. e4bac8d9).
with CorbaCBSG.CBSG.Skel;
pragma Unreferenced (CorbaCBSG.CBSG.Skel);
with Corporate_Bullshit;
with Ada.Calenda... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- Util.Beans.Objects.Enums -- Helper conversion for discrete types
-- Copyright (C) 2010, 2016, 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License")... |
with Interfaces; use Interfaces;
package MSPGD is
pragma Preelaborate;
type Buffer_Type is array (Integer range <>) of Unsigned_8;
procedure Standby with Inline_Always;
procedure Stop with Inline_Always;
procedure Reset with Inline_Always;
end MSPGD;
|
with Ada.Numerics.Generic_Complex_Types;
with Ada.Finalization;
generic
type Scalar_Type is digits <>;
with package Complex_Types is
new Ada.Numerics.Generic_Complex_Types (Scalar_Type);
package DSP.Generic_Functions is
subtype Complex_Type is Complex_Types.Complex;
type Scalar_Array is array (Integ... |
with Interfaces; use Interfaces;
with MSPGD.Board;
with Drivers.Text_IO;
procedure Main is
pragma Preelaborate;
package Board renames MSPGD.Board;
package Text_IO is new Drivers.Text_IO (USART => Board.UART);
N : Unsigned_32 := 0;
begin
Board.Init;
Text_IO.Put_Line ("Hello, World!");
loop
... |
with Ada.Text_IO;
with YAML;
procedure version is
begin
Ada.Text_IO.Put_Line (YAML.Version);
end version;
|
-- { dg-do compile }
with Discr12_Pkg; use Discr12_Pkg;
procedure Discr13 is
function F1 return Integer is
begin
return Dummy (1);
end F1;
protected type Poe (D3 : Integer := F1) is
entry E (D3 .. F1); -- F1 evaluated
function Is_Ok (D3 : Integer; E_First : Integer; E_Last : Integer) return B... |
with Ada.Text_IO;
-- source https://en.wikibooks.org/wiki/Ada_Programming/Control
procedure Iterate_Range is
type Range_Type is range -5 .. 10;
package T_IO renames Ada.Text_IO;
package I_IO is new Ada.Text_IO.Integer_IO (Range_Type);
begin
for A in Range_Type loop
I_IO.Put (Item => A,
... |
--
-- Copyright (C) 2020, AdaCore
--
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
----------------
-- Interrupts --
----------------
L2_Cache_Metadata_Correction : constant Interrupt_ID := 1;
L2_Cache_Metadata_un... |
-----------------------------------------------------------------------
-- util-log-loggers -- Utility Log Package
-- Copyright (C) 2006, 2008, 2009, 2011, 2018, 2019, 2021 Free Software Foundation, Inc.
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (... |
with Ada.Text_IO;
with DDS.Request_Reply.Tests.Simple.String_Requester;
procedure DDS.Request_Reply.Tests.Simple.Requester_Main is
Requester : DDS.Request_Reply.Tests.Simple.String_Requester.Ref_Access :=
DDS.Request_Reply.Tests.Simple.String_Requester.Create
(Participan... |
package body Opt59_Pkg is
function Get_BV1 return Boolean_Vector is
begin
return (others => True);
end;
function Get_BV2 return Boolean_Vector is
begin
return (others => False);
end;
procedure Test (B : Boolean) is
begin
if not B then
raise Program_Error;
end if;
end;
end Opt... |
package Parameter is
X: Natural := 0;
Y: Natural;
end Parameter;
|
-- { dg-do compile }
-- { dg-options "-O -gnatn" }
package body Inline13 is
function F (L : Arr) return String is
Local : Arr (1 .. L'Length);
Ret : String (1 .. L'Length);
Pos : Natural := 1;
begin
Local (1 .. L'Length) := L;
for I in 1 .. Integer (L'Length) loop
Ret (Pos .. Pos + 8) :... |
-- Abstract :
--
-- Root package for generating a parser from a BNF source file; see [2]
--
-- The input file syntax is based on BNF syntax [1] with declarations
-- and grammar actions.
--
-- The Elisp and Ada_Emacs output languages are for use with the
-- Emacs wisi package.
--
-- Reference :
--
-- [1] https:/... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
package body Renaming2_Pkg4 is
package body Inner is
function Next_Value return Value_T is
Next_Value : Value_T renames Value (Next);
begin
return Next_Value;
end Next_Value;
end Inner;
end Renaming2_Pkg4;
|
with OpenGL.Thin;
with OpenGL.Types;
package OpenGL.Vertex is
type Primitive_Type_t is
(Points,
Line_Strip,
Line_Loop,
Lines,
Triangle_Strip,
Triangle_Fan,
Triangles,
Quad_Strip,
Quads,
Polygon);
--
-- Immediate mode. Begin/End.
--
-- proc_map : glBegin
p... |
with Ada; use Ada;
with Ada.Text_IO;
with Ada.Text_IO.Text_Streams; use Ada.Text_IO.Text_Streams;
with Ada.Streams;
with Ada.Streams.Stream_IO;
with Ada.Command_Line;
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Containers... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- { dg-do run }
with Interfaces; use Interfaces;
procedure Array6 is
type buf_t is array (unsigned_32 range <>) of character;
type v_str_t (first, last : unsigned_32) is
record
buf : buf_t (first .. last) := (others => ' ');
end record;
type v_str_ptr_t is access all v_str_t;
v_str... |
with
openGL.Geometry.lit_textured,
openGL.Primitive.indexed;
package body openGL.Model.hexagon.lit_textured
is
---------
--- Forge
--
function new_Hexagon (Radius : in Real;
Face : in lit_textured.Face) return View
is
Self : constant View := new Item;
begi... |
-- This file is generated by SWIG. Please do *not* modify by hand.
--
with Interfaces.C;
package gmp_c.Pointers is
-- mp_limb_t_Pointer
--
type mp_limb_t_Pointer is access all gmp_c.mp_limb_t;
-- mp_limb_t_Pointers
--
type mp_limb_t_Pointers is
array
(Interfaces.C
.size_t rang... |
pragma License (Unrestricted);
-- Ada 2012
-- with Ada.Real_Time;
-- with Ada.Task_Identification;
package System.Multiprocessors.Dispatching_Domains is
Dispatching_Domain_Error : exception;
type Dispatching_Domain (<>) is limited private;
System_Dispatching_Domain : constant Dispatching_Domain;
-- fun... |
package Global_Constant is
pragma Elaborate_Body;
An_Error : exception;
end;
|
------------------------------------------------------------------------------
-- G P S --
-- --
-- Copyright (C) 2001-2017, AdaCore --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Unbounded;
with Ada.Calendar; use Ada.Calendar;
procedure Dynamic_Test is
subtype Odd_Number is Integer with
Dynamic_Predicate => Odd_Number mod 2 /= 0;
A_Number : Odd_Number := 1;
-- despite the procedure name, I've used this source to test
... |
-- { dg-do compile }
with Inline4_Pkg; use Inline4_Pkg;
procedure Inline4 is
begin
Test (0);
end;
|
package Opt8 is
type Value_Number_Kind is
(Int_Literal_VN,
Selected_Address_VN,
Membership_VN,
Initial_External_Kappa_VN,
Aliased_Kappa_VN,
Phi_As_Kappa_VN,
Multi_Target_Call_Kappa_VN,
Final_Value_Of_Seq_Kappa_VN,
Block_Kappa_VN);
subtype Kappa_VN ... |
package ARM_Syntax is
--
-- Ada reference manual formatter (ARM_Form).
--
-- This package contains the database to collect the syntax summary and
-- cross-reference.
--
-- ---------------------------------------
-- Copyright 2000, 2006, 2011
-- AXE Consultants. All right... |
with Interfaces; use Interfaces;
with Interfaces.C; use Interfaces.C;
package SPI is
MODE0: constant Integer := 0;
BIT_ORDER_MSBFIRST: constant Integer := 1;
CLOCK_DIVIDER_128: constant Integer := 128;
CS0: constant Integer := 0;
LOW: constant Integer := 0;
procedure Start;
pragma Import (C, Start, "b... |
--
-- Copyright 2021 (C) Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: Apache-2.0
--
with Notcurses.Channel; use Notcurses.Channel;
with Interfaces; use Interfaces;
package Notcurses.Plane is
type Alignment is (Unaligned, Left, Center, Right);
-- Get a reference to the standard plane usin... |
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-- { dg-do run }
-- { dg-options "-flto" { target lto } }
with Lto5_Pkg;
procedure Lto5 is
begin
null;
end;
|
with AdaCar.Parametros;
with AdaCar.Entrada_Salida;
package body AdaCar.Sensor_Proximidad is
--------------------------
-- Sensor_Proximidad_PO --
--------------------------
protected Sensor_Proximidad_PO
with Priority => Parametros.Techo_Sensor_Proximidad_PO
is
function Leer_Entrada_Sens... |
-- { dg-do compile }
generic
package Iface_Eq_Test is
type Iface is limited interface;
function "=" (L, R : access Iface) return Boolean is abstract;
end;
|
pragma License (Unrestricted);
-- extended unit
package Ada.Tags.Delegating is
-- Delphi-like interface delegation.
pragma Preelaborate;
generic
type T (<>) is abstract tagged limited private;
type I is limited interface;
with function Get (Object : not null access T'Class)
return... |
generic
type Character_Type is (<>);
type String_Type is array (Positive range <>) of Character_Type;
Default_Encoding : in String;
package iconv.Generic_Strings is
pragma Preelaborate;
-- decoder
type Decoder is new Converter;
function From (
From_Encoding : String;
To_Encoding : String := Default_Enc... |
-- Copyright (c) 2021 Bartek thindil Jasicki <thindil@laeran.pl>
--
-- 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... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
function Case_Function(X : in Integer) return Integer is
Result : Integer;
begin
case X is
when 0 => Result := 0;
when 1 | 3 => Result := 1;
when 2 | 4..8 => Result := 2;
when others => Result :=3;
end case;
return Result;
end Case_Function;
|
pragma Ada_2012;
with Adventofcode.File_Line_Readers;
package body Adventofcode.Day_3 is
Tree : constant Character := '#';
----------
-- Race --
----------
function Race (Slope : Slope_Type; Right : Natural := 3; Down : Natural := 1) return Long_Long_Integer is
Count : Long_Long_Integer := 0;
... |
with ObjectPack, AbstractStrategyPackage, StrategyPackage, VisitablePackage;
use ObjectPack, AbstractStrategyPackage, StrategyPackage, VisitablePackage;
package AbstractStrategyCombinatorPackage is
type AbstractStrategyCombinator is abstract new AbstractStrategy and Object with
record
arguments : ObjectPtrArrayPt... |
with CLIC.TTY;
with CLIC.User_Input;
with CLIC_Ex.Commands.TTY;
with CLIC_Ex.Commands.User_Input;
package body CLIC_Ex.Commands is
Help_Switch : aliased Boolean := False;
No_Color : aliased Boolean := False;
-- Force-disable color output
No_TTY : aliased Boolean := False;
-- Used to disable contro... |
with Ada.Text_IO, Ada.Float_Text_IO, Ada.Numerics.Elementary_Functions;
procedure Count_Entropy is
package TIO renames Ada.Text_IO;
Count: array(Character) of Natural := (others => 0);
Sum: Natural := 0;
Line: String := "1223334444";
begin
for I in Line'Range loop -- count the characters
Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.