content stringlengths 23 1.05M |
|---|
with Ada.Text_IO;
procedure Octal is
package IIO is new Ada.Text_IO.Integer_IO(Integer);
begin
for I in 0 .. Integer'Last loop
IIO.Put(I, Base => 8);
Ada.Text_IO.New_Line;
end loop;
end Octal;
|
-----------------------------------------------------------------------
-- druss-commands-bboxes -- Commands to manage the bboxes
-- Copyright (C) 2017, 2018, 2019, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
--... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- As input events occur, we just keep them here. Then as a window
-- is notified of something, if it's a Troodon app, we will wake it
-- up and it can pull whatever inputs it wants.
package Events.Inputs is
type InputEvent is (MOUSEMOVEMENT, BUTTONDOWN, BUTTONUP, KEYDOWN, KEYUP, QUIT);
end Events.Inputs; |
generic
Capacite : integer;
package Arbre_Foret is
type T_Abr_Foret is private;
type T_Tableau is private;
Capacite_Tableau_Compagnon_Maximale : Exception;
Compagnon_Existe : Exception;
Epoux_Existe : Exception;
Pere_Existe : Exception;
Mere_Existe : Exception;
Cle_Absente : Exception;
procedure Initi... |
-- C52008B.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... |
-- 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... |
-- Copyright (C) 2020 Glen Cornell <glen.m.cornell@gmail.com>
--
-- 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 versi... |
with agar.gui.widget.scrollbar;
with agar.gui.widget.editable;
package agar.gui.widget.textbox is
use type c.unsigned;
subtype cursor_pos_t is agar.gui.widget.editable.cursor_pos_t;
type flags_t is new c.unsigned;
TEXTBOX_MULTILINE : constant flags_t := 16#00001#;
TEXTBOX_PASSWORD : constant flag... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Simple HTTP --
-- --
-- ... |
-----------------------------------------------------------------------
-- measures -- Example of Runtime Benchmark
-- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License")... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Containers.Vectors;
with Program.Compilation_Unit_Vectors;
package Program.Units.Vectors is
pragma Preelaborate;
typ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
-- C45651A.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 System;
with Interfaces.C;
package STB.Image is
function Load (Filename : String;
X, Y, Channels_In_File : out Interfaces.C.int;
Desired_Channels : Interfaces.C.int)
return System.Address;
function Write_PNG (Filename : String;
... |
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ... |
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.DMA2D is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_MODE_Field is HAL.UInt2;
-- ... |
-- package pc_1_coeff_17
--
-- Predictor_Rule : Integration_Rule renames Predictor_32_17;
--
-- Corrector_Rule : Integration_Rule renames Corrector_33_17;
--
-- Final_Step_Corrector : Real renames Final_Step_Corrector_33_17;
--
generic
type Real is digits <>;
package pc_1_coeff_17 is
subtyp... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements;
package Program.Nodes is
pragma Preelaborate;
type Node is abstract limited new Program.Elements.Eleme... |
package OCONST2 is
type u8 is mod 2**8;
type Base is record
i1 : Integer;
end Record;
type R is record
u : u8;
b : Base;
end record;
for R use record
u at 0 range 0 .. 7;
b at 1 range 0 .. 31; -- aligned SImode bitfield
end record;
My_R : constant R := (u=>1, b=>(i1=>2));
pr... |
package RTCH.Maths.Tuples with
Pure is
type Tuple is record
X : Float;
Y : Float;
Z : Float;
W : Float;
end record;
function "+" (Left, Right : in Tuple) return Tuple is
(Tuple'(X => Left.X + Right.X,
Y => Left.Y + Right.Y,
Z => Left.Z + Right.Z,
... |
with Ada.Finalization;
with Ada.Streams;
with Ada.Strings.Unbounded;
with Interfaces;
with kv.avm.Instructions;
with kv.avm.Tuples;
with kv.avm.Actor_References;
with kv.avm.references;
package kv.avm.Registers is
Unimplemented_Error : exception;
subtype String_Type is Ada.Strings.Unbounded.Unbounded_String;
... |
-- Copyright 2016-2021 Bartek thindil Jasicki
--
-- This file is part of Steam Sky.
--
-- Steam Sky is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (a... |
package body agar.gui.unit is
package cbinds is
function find (key : cs.chars_ptr) return unit_const_access_t;
pragma import (c, find, "AG_FindUnit");
function best
(unit_group : unit_const_access_t;
n : c.double) return unit_const_access_t;
pragma import (c, best, "AG_BestUn... |
with Ada.Text_IO; use Ada.Text_IO;
procedure Test is x: integer := 2147483648; begin Put('a'); end;
|
with utils, ada.text_io, ada.Float_Text_IO, ada.Integer_Text_IO;
use utils, ada.text_io, ada.Float_Text_IO, ada.Integer_Text_IO;
package montecarlo is
--E/ cards : T_set
--E/S/ sample : T_set
--Necessite : Table ne contient pas plus de 5 cartes
--Entraine : Genere 50 000 jeux en completant le jeu exi... |
with System.Address_To_Access_Conversions;
package body zlib.Streams is
generic
with procedure Deflate_Or_Inflate (
Stream : in out zlib.Stream;
In_Item : in Ada.Streams.Stream_Element_Array;
In_Last : out Ada.Streams.Stream_Element_Offset;
Out_Item : out Ada.Streams.Stream_Element_Array;
Out_Last :... |
with CLIC.Subcommand;
private with Ada.Text_IO;
private with GNAT.OS_Lib;
private with CLIC.Subcommand.Instance;
private with CLIC.TTY;
private with FSmaker.Target;
package FSmaker.Commands is
procedure Set_Global_Switches
(Config : in out CLIC.Subcommand.Switches_Configuration);
procedure Execute;
f... |
pragma License (Unrestricted);
-- Ada 2012
private with Ada.Containers.Copy_On_Write;
private with Ada.Finalization;
private with Ada.Streams;
generic
type Element_Type (<>) is private;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Holders is
pragma Pre... |
with SDA_Exceptions; use SDA_Exceptions;
-- Définition de structures de données associatives sous forme d'une liste
-- chaînée associative (LCA).
generic
type T_Cle is private;
type T_Donnee is private;
package LCA is
type T_LCA is private;
-- Initialiser une Sda. La Sda est vide.
procedure Initialiser(Sda: o... |
with ada.text_io;
package body keyevent_callbacks is
package io renames ada.text_io;
procedure keydown (event : gui_event.event_access_t) is
keyint : constant integer := gui_event.get_integer (event, 1);
modint : constant integer := gui_event.get_integer (event, 2);
keystr : constant string := integer... |
package Courbes.Droites is
use Liste_Points;
type Droite is new Courbe with private;
-- Crée une droite
function Ctor_Droite (Debut, Fin : Point2D) return Droite;
-- Obtient un point d'une droite
overriding function Obtenir_Point(Self : Droite; X : Coordonnee_Normalisee) return Point2D;
o... |
package body Inline13_Pkg is
function Padded (Value : T) return Padded_T is
begin
return Padded_T(Value);
end Padded;
end Inline13_Pkg;
|
-----------------------------------------------------------------------
-- awa-questions-tests -- Unit tests for questions module
-- Copyright (C) 2018, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may no... |
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 euler32 is
type stringptr is access all char_array;
procedure PString(s : stringptr) is
begin
String'Write (Text_Streams.S... |
-- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ skills vector container implementation --
-- |___/_|\_\_|_|____| by: Dennis Przytarski, Timm Felden ... |
-----------------------------------------------------------------------
-- security-oauth -- OAuth Security
-- Copyright (C) 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in co... |
-----------------------------------------------------------------------
-- security-policies-urls -- URL security policy
-- Copyright (C) 2010, 2011, 2012, 2017, 2018, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");... |
-----------------------------------------------------------------------
-- util-stacks -- Simple stack
-- Copyright (C) 2010, 2011 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 except in c... |
-----------------------------------------------------------------------
-- gen-artifacts-xmi -- UML-XMI artifact for Code Generator
-- Copyright (C) 2012, 2013, 2014, 2015, 2016, 2018, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0... |
package openGL.Frustum
--
-- Provide frustum operations.
--
is
type Plane_Id is (Left, Right, High, Low, Near, Far);
type Plane_array is array (Plane_Id) of openGL.Geometry_3d.Plane;
procedure normalise (Planes : in out Plane_array);
end openGL.Frustum;
|
-- Based on AdaCore's Ada Drivers Library,
-- see https://github.com/AdaCore/Ada_Drivers_Library,
-- checkout 93b5f269341f970698af18f9182fac82a0be66c3.
-- Copyright (C) Adacore
--
-- Tailored to StratoX project.
-- Author: Martin Becker (becker@rcs.ei.tum.de)
with STM32_SVD.RCC; use STM32_SVD.RCC;
package body M... |
-- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
package body Yaml.Destination.Text_IO is
function As_Destination (File : Ada.Text_IO.File_Access)
return Pointer is
(new Instance'(Ada.Finalization.Limited_Controll... |
package body ACO.Nodes is
overriding
procedure On_Event
(This : in out Tick_Subscriber;
Data : in ACO.Events.Handler_Event_Data)
is
begin
This.Node_Ref.Periodic_Actions (T_Now => Data.Current_Time);
This.Node_Ref.Od.Events.Process;
end On_Event;
overriding
procedure ... |
--
-- Uwe R. Zimmer, Australia, July 2011
--
generic
type Element is private;
type Buffer_Index is mod <>;
package Generic_Realtime_Buffer is
pragma Elaborate_Body;
type Realtime_Buffer is private;
procedure Put (B : in out Realtime_Buffer; Item : Element);
procedure Get (B : in out Realtime... |
-- Copyright (c) 2021 Devin Hill
-- zlib License -- see LICENSE for details.
with Ada.Unchecked_Conversion;
with System;
use type System.Address;
package body GBA.Display.Objects is
type Shape_Scale is
record
Scale : OBJ_Scale;
Shape : OBJ_Shape;
end record
with Size => 4;
for Shape_... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- { dg-do compile }
package Import_Abstract is
type T1 is abstract tagged null record;
procedure p1(X : T1) is abstract;
pragma Import (Ada, p1); -- { dg-error "cannot import abstract subprogram" }
end Import_Abstract;
|
-- { dg-do compile }
procedure Bad_Array is
A1 : array(Character range <> ) of Character := ( 'a', 'b', 'c' );
begin
null;
end Bad_Array;
|
procedure Named_Block is
begin
TheBlock: declare
type IntArray is array(1..2) of Integer;
ia : IntArray := (others => 0);
begin
null;
end TheBlock;
end Named_Block;
|
with Ada.Text_IO;
package body Fibonacci is
function Has_Element (Pos : Fibo_Cur) return Boolean is
(Pos.Cur <= Natural'Last - Pos.Prev and Pos.Prev > 0);
overriding
function First (O : Fibo_Forward) return Fibo_Cur is
((Cur => 1, Prev => 1));
overriding
function Next (O : Fibo_F... |
--
-- Copyright (C) 2014-2017 secunet Security Networks AG
--
-- 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.
--
-- ... |
-- Test QR least squares equation solving real valued *square* matrices.
with Ada.Numerics.Generic_elementary_functions;
with Givens_QR;
with Test_Matrices;
With Text_IO; use Text_IO;
procedure givens_qr_tst_2 is
type Real is digits 15;
subtype Index is Integer range 1..191;
Start_Index : constant Index ... |
with BMP_Fonts;
with HAL.Bitmap; use HAL.Bitmap;
with HAL.Framebuffer; use HAL.Framebuffer;
with Inputs; use Inputs;
with LCD_Std_Out;
with STM32.Board; use STM32.Board;
with Interfaces; use Interfaces;
package body Gfx is
procedure Init_Draw is
begin
-- Initialize LCD
Display.Initialize;
D... |
with Ada.Unchecked_Deallocation;
package body pointers is
function New_Ptr (Base_Class : Base_Class_Accessor) return pointer is
begin
return pointer'
(Ada.Finalization.Controlled with Pointer => Base_Class);
end New_Ptr;
function Deref (Ptr : pointer) return Base_Class_Accessor is
begin... |
with
openGL.Camera,
ada.Characters.latin_1;
package openGL.Dolly
--
-- A utility which moves a camera via the keyboard.
--
is
type Item (Camera : openGL.Camera.view) is tagged private;
procedure Speed_is (Self : in out Item; Now : in Real);
procedure evolve (Self : in out I... |
package body agar.gui.widget.pixmap is
use type c.int;
package cbinds is
function allocate
(parent : widget_access_t;
flags : flags_t;
width : c.int;
height : c.int) return pixmap_access_t;
pragma import (c, allocate, "AG_PixmapNew");
function add_surface
(pixmap :... |
package body Bluetooth_Low_Energy is
---------------
-- Make_UUID --
---------------
function Make_UUID (UUID : UInt16) return BLE_UUID is
begin
return (Kind => UUID_16bits,
UUID_16 => UUID);
end Make_UUID;
---------------
-- Make_UUID --
---------------
function... |
package Multidimensional_Array is
subtype WorkWeek is Natural range 1 .. 5;
subtype WorkHours is Natural range 1 .. 8;
type FullTime is array(WorkWeek, WorkHours) of Boolean;
type PartTime is array(WorkWeek range<>, WorkHours range<>) of Boolean;
type Afternoons is new PartTime(1..5, 5..8);
pr... |
with Libadalang.Analysis;
with Libadalang.Rewriting;
with Libadalang.Common;
package Offmt_Lib.Rewrite is
package LAL renames Libadalang.Analysis;
package LALCO renames Libadalang.Common;
package LALRW renames Libadalang.Rewriting;
procedure Rewrite_Log_Call (RH : LALRW.Rewriting_Handle;
... |
-- Swagger Petstore
-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters.
-- ------------ EDIT NO... |
pragma License (Unrestricted);
package Interfaces is
pragma Pure;
type Integer_8 is range -(2 ** 7) .. 2 ** 7 - 1; -- 2's complement
for Integer_8'Size use 8;
type Integer_16 is range -(2 ** 15) .. 2 ** 15 - 1;
for Integer_16'Size use 16;
type Integer_32 is range -(2 ** 31) .. 2 ** 31 - 1;
for Int... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2012 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... |
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the... |
with Math_2D.Types;
with Math_2D.Points;
with Math_2D.Vectors;
generic
with package Types is new Math_2D.Types (<>);
with package Vectors is new Math_2D.Vectors (Types);
with package Points is new Math_2D.Points
(Types => Types,
Vectors => Vectors);
package Math_2D.Triangles is
function Area
... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
with Ada.Containers.Indefinite_Vectors;
package body Mode is
-- map Count to Elements
package Count_Vectors is new Ada.Containers.Indefinite_Vectors
(Element_Type => Element_Array,
Index_Type => Positive);
procedure Add (To : in out Count_Vectors.Vector; Item : Element_Type) is
use type Cou... |
-- SPDX-License-Identifier: MIT
--
-- Copyright (c) 2016 - 2018 Gautier de Montmollin
-- SWITZERLAND
--
-- The copyright holder is only the maintainer of the Ada version;
-- authors of the C code and those of the algorithm are cited below.
--
-- Permission is hereby granted, free of charge, to any person obtainin... |
-- File: Hello.adb
-- Name: Andrew Albanese
-- Date: 1/20/2018
with Ada.Text_IO; use Ada.Text_IO;
PROCEDURE Hello IS
BEGIN
Put("Hi");
end Hello; |
with
GID,
ada.Calendar;
package body openGL.Images
is
function fetch_Image (Stream : in Ada.Streams.Stream_IO.Stream_Access;
try_TGA : in Boolean) return openGL.Image
is
the_GID_Image : GID.Image_descriptor;
next_Frame : Ada.Calendar.Day_Duration := 0.0;
be... |
with Ada.Containers.Vectors;
package EU_Projects.Identifiers.Full is
use type Ada.Containers.Count_Type;
type Segment_Index is range 1 .. Integer'Last;
type Full_ID is private;
Empty_Path : constant Full_ID;
function "=" (X, Y : Full_ID) return Boolean;
function "<" (X, Y : Full_ID) return Boolea... |
------------------------------------------------------------------------------
-- Copyright (c) 2014, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
private package GL.Text.UTF8 is
type Code_Point is mod 2**32;
subtype UTF8_Code_Point is Code_Point range 0 .. 16#10FFFF#;
procedure Read (Buffer : String; Position : in out Positive;
Result : out UTF8_Code_Point);
end GL.Text.UTF8;
|
package body Julia_Set is
procedure Calculate_Pixel (Re : Real;
Im : Real;
Z_Escape : out Real;
Iter_Escape : out Natural)
is
Re_Mod : Real := Re;
Im_Mod : Real := Im;
begin
for I... |
with Ada.Unchecked_Deallocation;
package body Oriented is
function NewObj
return Object_Access
is
Local : Object_Access;
begin
Local := new Object'(Counter => 3,
Id => (Serial => 1,
Subpart => 2));
return Local;
end New... |
-------------------------------------------------------------------------------
-- 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 w... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-------------------------------------------------------------------------------
-- Copyright (c) 2019, Daniel King
-- 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... |
-- { dg-do run }
-- { dg-options "-gnatws" }
procedure Tfren is
type R;
type Ar is access all R;
type R is record F1: Integer; F2: Ar; end record;
for R use record
F1 at 1 range 0..31;
F2 at 5 range 0..63;
end record;
procedure Foo (RR... |
-----------------------------------------------------------------------
-- security-oauth-servers-tests - Unit tests for server side OAuth
-- Copyright (C) 2017, 2018, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");... |
with Drawing; use Drawing;
package body Tracks_Display is
Entry_Sign_Size : constant := 6;
Entry_Sign_Pixel : constant array (Entry_Sign_Color) of Color
:= (Green => Screen_Interface.Green,
Orange => Screen_Interface.Orange,
Red => Screen_Interface.Red);
Track_Color : constant Color :... |
with Ada.Strings.Unbounded, Ada.Text_IO, Ada.Command_Line, Ada.Directories;
procedure Global_Replace is
subtype U_String is Ada.Strings.Unbounded.Unbounded_String;
function "+"(S: String) return U_String renames
Ada.Strings.Unbounded.To_Unbounded_String;
function "-"(U: U_String) return String renames
... |
-- { dg-do compile }
-- { dg-options "-O" }
with Unchecked_Conversion;
with System; use System;
with Opt58_Pkg; use Opt58_Pkg;
procedure Opt58 is
function Convert is new Unchecked_Conversion (Integer, Rec);
Dword : Integer := 0;
I : Small_Int := F1 (Convert (Dword));
begin
if F2 (Null_Ad... |
with Solve; use Solve;
with Ada.Text_IO; use Ada.Text_IO;
procedure Solve_Part_2 is
Input_File : File_Type;
A : Integer;
B : Integer;
C : Integer;
Previous_Sum : Integer := 16#7FFF_FFFF#;
Answer : Integer := 0;
begin
Open (Input_File, In_File, "input.txt")... |
--
-- Copyright (C) 2016 secunet Security Networks AG
--
-- 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 ... |
with
Interfaces.C.Strings,
System;
use type
Interfaces.C.int,
System.Address;
package body FLTK.Widgets.Valuators.Value_Outputs is
procedure value_output_set_draw_hook
(W, D : in System.Address);
pragma Import (C, value_output_set_draw_hook, "value_output_set_draw_hook");
... |
with Ada.Text_IO;
with Ada.Integer_Text_IO;
with Ada.Command_Line;
with Ada.Strings.Fixed;
procedure Recursion is
use Ada.Strings.Fixed;
Input, Cycles, Total, F: Integer;
function Fib(P: Integer) return Integer is
begin
if P < 2 then
return 1;
else
return Fib(P-1) + Fib(P-2);
end if;... |
with Ada.Text_IO; use Ada.Text_IO;
--with NRF52_DK.Time;
--with NRF52_DK.IOs; use NRF52_DK.IOs;
package Setup is
protected Motor_Setup with Priority => 25 is
procedure Calibrate_Motors_If_Required;
private
Setup_Done : Boolean := False;
end Motor_Setup;
end Setup;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2020 Daniel King
--
-- 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... |
-----------------------------------------------------------------------
-- package body Chebychev_Quadrature. Coefficients for Chebychev-Gaussian quadrature.
-- Copyright (C) 2018 Jonathan S. Parker
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby ... |
with GID.Buffering;
with Ada.Exceptions;
package body GID.Color_tables is
procedure Convert(c, d: in U8; rgb: out RGB_color) is
begin
rgb.red := (d and 127) / 4;
rgb.green:= (d and 3) * 8 + c / 32;
rgb.blue := c and 31;
--
rgb.red := U8((U16(rgb.red ) * 255) / 31);
rgb.gre... |
-- 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;
with System.Address_To_Access_Conversions;
with System.Address_To_Constant_Access_Conversions;
with System.Address_To_Named_Access_Conversions;
procedure addrconv is
package AC1 is new System.Address_To_Access_Conversions (Integer);
type TA is access all Integer;
pragma No_Strict_Aliasing (TA);
package AC... |
with Ada.Text_IO;
procedure Catamorphism is
type Fun is access function (Left, Right: Natural) return Natural;
type Arr is array(Natural range <>) of Natural;
function Fold_Left (F: Fun; A: Arr) return Natural is
Result: Natural := A(A'First);
begin
for I in A'First+1 .. A'Last loop
Result ... |
with Ada.Text_IO, Ada.Float_Text_IO;
procedure FindMedian is
f: array(1..10) of float := ( 4.4, 2.3, -1.7, 7.5, 6.6, 0.0, 1.9, 8.2, 9.3, 4.5 );
min_idx: integer;
min_val, median_val, swap: float;
begin
for i in f'range loop
min_idx := i;
min_val := f(i);
for j in i+1 .. f'last... |
with
Interfaces.C.Strings,
System;
use type
System.Address;
package body FLTK.Widgets.Clocks is
procedure clock_output_set_draw_hook
(W, D : in System.Address);
pragma Import (C, clock_output_set_draw_hook, "clock_output_set_draw_hook");
pragma Inline (clock_output_set_draw_h... |
-- { dg-do run }
-- { dg-options "-gnatws" }
with System;
procedure Pack11 is
type R1 is record
A1, A2, A3 : System.Address;
end record;
type R2 is record
C : Character;
R : R1;
end record;
pragma Pack (R2);
procedure Dummy (R : R1) is begin null; end;
procedure Init (X : R2) is
begin
... |
------------------------------------------------------------------------------
-- --
-- Modular Hash Infrastructure --
-- --
-- ... |
with Tkmrpc.Types;
with Tkmrpc.Operations.Cfg;
package Tkmrpc.Response.Cfg.Tkm_Limits is
Data_Size : constant := 132;
type Data_Type is record
Max_Active_Requests : Types.Active_Requests_Type;
Authag_Contexts : Types.Authag_Id_Type;
Cag_Contexts : Types.Cag_Id_Type;
Li_Contex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.