content
stringlengths
23
1.05M
package Enum1_Pkg is type Enum is (One, Two, Three); subtype Sub_Enum is Enum; My_N : Sub_Enum := One; end Enum1_Pkg;
-- AoC 2020, Day 1 with Ada.Text_IO; package body Day is package TIO renames Ada.Text_IO; function load_file(filename : in String) return Expense_Vector.Vector is file : TIO.File_Type; expenses : Expense_Vector.Vector; begin TIO.open(File => file, Mode => TIO.In_File, Name => filename); while no...
with Interfaces; with Fmt.Generic_Mod_Int_Argument; package Fmt.Uint64_Argument is new Generic_Mod_Int_Argument(Interfaces.Unsigned_64);
-- Score PIXAL le 05/10/2020 à 18:21 : 92% -- Score PIXAL le 07/10/2020 à 15:36 : 100% with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; procedure Ecrire_Entier is function Puissance_Iteratif (Nombre: in Float ; Exposant...
-- -- -- package Copyright (c) Francois Fabien -- -- AdaPcre -- -- Body -- -- ...
package Component_Declaration is type The_Record is record The_Component : Integer; end record; end Component_Declaration;
-- { dg-do compile } -- { dg-options "-fdump-tree-gimple" } with Atomic6_Pkg; use Atomic6_Pkg; procedure Atomic6_8 is Ptr : Int_Ptr := new Int; Temp : Integer; begin Ptr.all := Counter1; Counter1 := Ptr.all; Ptr.all := Int(Timer1); Timer1 := Integer(Ptr.all); Temp := Integer(Ptr.all); Ptr.all := I...
with Ada.Text_IO; use Ada.Text_IO; procedure Adventofcode.Day_9.Main is D : Decoder (1024); Key : Long_Integer := 0; Answer : Long_Integer := 0; begin D.Read ("src/day-9/input.test"); D.Scan (5, Key); Put_Line (Key'Img); D.Read ("src/day-9/input.test.2"); D.Scan2 (Key, Answer); Put_Line (A...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Apsepp.Generic_Discrete_Operations; generic type Index_Type is (<>); type Element_Type is private; type Array_Type is array (Index_Type range <>) of Element_Type; with function "<" (Left, Right :...
-- { dg-do run } procedure alignment2 is pragma COMPONENT_ALIGNMENT(STORAGE_UNIT); MAX_LIST_SIZE : constant INTEGER := 128*16; LEVEL2_SIZE : constant INTEGER := 128; LEVEL1_SIZE : constant INTEGER := (MAX_LIST_SIZE - 1) / LEVEL2_SIZE + 1; ...
with Asis; package AdaM.Assist.Query.find_Entities.context_Processing is procedure Process_Context (The_Context : in Asis.Context; Trace : in Boolean := False); function Get_Unit_From_File_Name (Ada_File_Name : in String; The_Context : in Asis.Context) return Asis.Compil...
with gel.Sprite; package gel.Dolly.following -- -- Provides a camera dolly which follows a sprite. -- is type Item is new gel.Dolly.item with private; type View is access all Item'Class; --------- --- Forge -- overriding procedure define (Self : in out Item); overriding procedure d...
----------------------------------------------------------------------- -- util-http-clients-web -- HTTP Clients with AWS implementation -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you...
with agar.core.timeout; package agar.gui.widget.slider is use type c.unsigned; type flags_t is new c.unsigned; SLIDER_HFILL : constant flags_t := 16#01#; SLIDER_VFILL : constant flags_t := 16#02#; SLIDER_FOCUSABLE : constant flags_t := 16#04#; SLIDER_EXPAND : constant flags_t := SLIDER_HFILL o...
----------------------------------------------------------------------- -- awa-storages-beans -- Storage Ada Beans -- Copyright (C) 2012, 2013, 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use thi...
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- @author Alexander Senier -- @date 2019-01-16 -- -- Copyright (C) 2018 Componolit GmbH -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or w...
with Ada.Numerics; use Ada.Numerics; with System; package Init13 is type Complex is record R : Float; I : Float; end record; pragma Complex_Representation (Complex); type R1 is record F : Complex; end record; for R1'Bit_Order use System.Low_Order_First; for R1'Scalar_Storage_Order use Syste...
package surface.elements is procedure quad (X,Y, Width, Height : Integer ; Border : Boolean := False); procedure print (X,Y : Integer; Text : String; Size : Integer := 16); end surface.elements;
with Ada.Real_Time; use Ada.Real_Time; with STM32GD.Board; use STM32GD.Board; procedure Main is Next_Release : Time := Clock; Period : constant Time_Span := Milliseconds (500); begin Init; LED.Set; Text_IO.Put_Line ("Starting"); loop Text_IO.Put_Line ("Waiting"); Next_Release := N...
----------------------------------------------------------------------- -- security-random -- Random numbers for nonce, secret keys, token generation -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); ...
-- This spec has been automatically generated from STM32F40x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.SDIO is pragma Preelaborate; --------------- -- Registers -- --------------- subtype POWER_PWRCTRL_Field i...
pragma Ada_2012; with Ada.Strings.Fixed; package body Latex_Writer is -- The result of function 'Image associated to discrete types has -- a space at the beginning. That space is quite annoying and needs -- to be trimmed. This function is here so that everyone can use it function Chop (X : String) return...
pragma Ada_2012; with Tokenize.Token_Vectors; with Ada.Text_IO; use Ada.Text_IO; package body EU_Projects is function Verbose_To_ID (X : String) return Dotted_Identifier is begin Put_Line ("TT(" & X & ")" & Is_Valid_ID (X)'Image); return To_Bounded_String (X); end Verbose_To_ID; -----------...
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Element_Visitors; with Program.Elements; private with Program.Elements.Pragmas; private with Program.Elements.Defining_I...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with GL.Types; private with GL.Enums; -- Matrix stack API. This API is deprecated as of OpenGL 3.0. package GL.Fixed.Matrix is use GL.Types.Doubles; type Matrix_Stack (<>) is tagged private; ...
pragma License (Unrestricted); with Ada.Numerics.Generic_Real_Arrays; package Ada.Numerics.Real_Arrays is new Generic_Real_Arrays (Float); pragma Pure (Ada.Numerics.Real_Arrays);
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Ada.Directories; with Ada.Text_IO; with Ada.Characters.Latin_1; with GNAT.OS_Lib; with Unix; package body Parameters is package AD renames Ada.Directories; package TIO renames Ada.Text_IO; package ...
{% load kdev_filters %} {% block license_header %} {% if license %} -- {{ license|lines_prepend:"-- " }} -- {% endif %} {% endblock license_header %} with Ada.Command_Line, GNAT.Command_Line; with Ada.Directories, Ada.Environment_Variables; with Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; -- ...
-- -- Jan & Uwe R. Zimmer, Australia, July 2011 -- package body Keyboard is ----------------------- -- Keyboard Commands -- ----------------------- procedure Get_Keys (Commands : in out Commands_Array; Selected_Keyboard : access GLUT.Devices.Keyboard := GLUT.Devices.default_Keyboard...
with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package body Rejuvenation.File_Utils is procedure Write_String_To_File (Contents : String; File_Name : String) is F : Ada.Streams.Stream_IO.File_Type; begin Create_Path (Containing_Directory...
package body Test_Solution is procedure Assert( Test : Boolean ) is begin if not Test then raise Assertion_Error; end if; end Assert; procedure Set_Name( C : in out Solution_Case; Name : String ) is begin C.Name := SU.To_Unbounded_String(Name); end Set_Name;...
-- 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. -- -- Send requests for ayacc information to ayacc-info@ics.uci.edu -- Send bug reports for ayacc to ...
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 test_returns is type stringptr is access all char_array; function is_pair(i : in Integer) return Boolean is j : Integer; b...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Atomic.Unsigned; package body Offmt_Lib.Parser is function Parse_Format (Str : String) return Trace_Element; function Create_Plain_String (Str : String) return Trace_Ele...
with AdaBase; with Connect; with MyLogger; with Ada.Text_IO; with AdaBase.Logger.Facility; procedure Fruit4 is package CON renames Connect; package TIO renames Ada.Text_IO; package ALF renames AdaBase.Logger.Facility; numrows : AdaBase.Affected_Rows; cmd1 : constant String := "INSERT INTO fruits (fru...
package body Other_Basic_Subprogram_Calls is function Other_F1 return Integer is begin return 42; end Other_F1; procedure Other_P1 is begin null; end Other_P1; end Other_Basic_Subprogram_Calls;
package body Brackelib.Queues is procedure Enqueue (Self : in out Queue; Item : T) is begin Self.Container.Append (Item); end Enqueue; function Dequeue (Self : in out Queue) return T is Result: T; begin if Is_Empty (Self) then raise Queue_Empty; end if; Result :...
-- Abstract: -- -- A generic queue, allowing definite non-limited item types. -- -- Copyright (C) 2004, 2008, 2009, 2011, 2017, 2019 Free Software Foundation All Rights Reserved. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as pub...
-- -- PACKAGE Chebychev_Quadrature -- -- The package provides tables and procedures for Gaussian quadrature -- based on Chebychev polynomials (Gaussian-Chebychev quadrature). -- The number of points used in the quadrature (callocation points) -- is the generic formal parameter: No_Of_Gauss_Points. -- -- Usually not the...
-- Shoot'n'loot -- Copyright (c) 2020 Fabien Chouteau with GESTE; with PyGamer.Time; package Score_Display is procedure Init (Pos : GESTE.Pix_Point); procedure Update (Time_In_Game : PyGamer.Time.Time_Ms); end Score_Display;
with Generic_Collection_Test; with Generic_Table_Test; with Remote_Node_Test; package body Unit_Tests is function Suite return Access_Test_Suite is type T_GenericTableTest is access all Generic_Table_Test.Test'Class; type T_GenericCollectionTest is access all Generic_Collection_Test.Test'Class; ...
-- AOC 2020, Day 15 with Ada.Text_IO; use Ada.Text_IO; with Day; use Day; procedure main is s : constant Input_Array := (0, 8, 15, 2, 12, 1, 4); num : constant Natural := 2020; part1 : constant Natural := sequence(s, num); num2 : constant Natural := 30000000; part2 : constant Natural := sequence(s, num2); be...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Ada.Tags; with Ada.Assertions; with Apsepp.Test_Node_Class.Private_Test_Reporter; procedure Apsepp.Test_Node_Class.Generic_Case_And_Suite_Run_Body (Obj : Test_Node_Interfa'Class; Outcome : out T...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- G P S -- -- -- -- Copyright (C) 2000-2016, AdaCore -- -- ...
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../../License.txt package body AdaBase.Driver.Base.SQLite is --------------- -- execute -- --------------- overriding function execute (driver : SQLite_Driver; sql : String) return Affected_...
with Numerics, Numerics.Sparse_Matrices, Ada.Text_IO; use Numerics, Numerics.Sparse_Matrices, Ada.Text_IO; with Ada.Numerics.Generic_Real_Arrays; procedure Sparse_Test is use Real_IO, Int_IO; package RA is new Ada.Numerics.Generic_Real_Arrays (Real); use RA; -- U : RA.Real_Matrix := (1 => (1 => 1.0), ...
pragma License (Unrestricted); package Ada.Numerics is pragma Pure; Argument_Error : exception; Pi : constant := 3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37511; ["03C0"] : constant := Pi; e : constant := 2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69996; end Ada...
-- Project: MART - Modular Airborne Real-Time Testbed -- System: Emergency Recovery System -- Authors: Markus Neumair (Original C-Code) -- Emanuel Regnath (emanuel.regnath@tum.de) (Ada Port) -- -- Module Description: -- Driver for the Barometer MS5611-01BA03 private package MS5611.Register with ...
with System.Address_To_Named_Access_Conversions; with System.Standard_Allocators; with System.System_Allocators; package body System.Unbounded_Allocators is use type Storage_Elements.Integer_Address; use type Storage_Elements.Storage_Offset; package HA_Conv is new Address_To_Named_Access_Conversions (He...
----------------------------------------------------------------------- -- awa-applications -- Ada Web Application -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the...
private with Ada.Finalization, fov_types_h; package Libtcod.Maps is Error : exception; type X_Pos is new Interfaces.C.int range 0 .. Interfaces.C.int'Last; type Y_Pos is new Interfaces.C.int range 0 .. Interfaces.C.int'Last; type X_Diff is new Interfaces.C.int; type Y_Diff is new Interfaces.C.Int; ...
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, t...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
with Ada.Containers.Synchronized_Queue_Interfaces; with Ada.Containers.Unbounded_Priority_Queues; with Ada.Strings.Unbounded; procedure Priority_Queues is use Ada.Containers; use Ada.Strings.Unbounded; type Queue_Element is record Priority : Natural; Content : Unbounded_String; end record; ...
package Variant_Record is type Record_1 (Discriminant_1 : Boolean) is record case Discriminant_1 is when True => Component_2 : Integer; when False => Component_3 : Float; end case; end record; type Record_With_Others (Discriminant_1 : Boolean) is record ...
------------------------------------------------------------------------------- -- -- -- D D S . R E Q U E S T _ R E P L Y . R E P L Y _ G E N E R I C -- -- -- ...
------------------------------------------------------------------------------- -- Copyright (c) 2016 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...
----------------------------------------------------------------------- -- pq -- Postgresql libpq thin binding -- Copyright (C) 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 this file except in...
package body STM32GD.GPIO.Pin is procedure Init is begin null; end Init; procedure Set_Mode (Mode : Pin_IO_Modes) is begin null; end Set_Mode; procedure Set_Type (Pin_Type : Pin_Output_Types) is begin null; end Set_Type; function Get_Pull_Resistor return Internal_Pin_...
------------------------------------------------------------------------------ -- names.ads -- -- This package defines a collection of enumerated types that name some of the -- objects in the simulation: namely the philosophers, chopsticks, waiters, -- and cooks. -- -- Note that we enforce the rule that t...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Ada.Text_IO; procedure Foo is begin Ada.Text_IO.Put_Line("Bar"); end Foo;
-- ___ _ ___ _ _ -- -- / __| |/ (_) | | Common SKilL implementation -- -- \__ \ ' <| | | |__ skills vector container implementation -- -- |___/_|\_\_|_|____| by: Dennis Przytarski, Timm Felden ...
limited with Limited_With3_Pkg3; package Limited_With3_Pkg2 is type T is tagged null record; procedure Proc (X : Limited_With3_Pkg3.TT; Y : T); end Limited_With3_Pkg2;
-- Minimum package providing support for Unit testing package Test_Assertions is Test_Assertion_Error : exception; procedure Assert_True (Value : Boolean); -- Raises Assertion_Error when Value is False procedure Assert_False (Value : Boolean); -- Raises Assertion_Error when Value is True proce...
----------------------------------------------------------------------- -- mat-callbacks - Callbacks for Gtk -- Copyright (C) 2014 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...
with Discr16_Pkg; use Discr16_Pkg; package Discr16_Cont is type ES6a is new ET3a range E2..E4; end;
function System.Tasking.Async_Delays.Enqueue_Calendar ( T : Ada.Calendar.Time; D : not null access Delay_Block) return Boolean is begin raise Program_Error; -- unimplemented return Enqueue_Calendar (T, D); end System.Tasking.Async_Delays.Enqueue_Calendar;
with Main; -- the entry point after POR procedure boot is -- pragma Priority (MAIN_TASK_PRIORITY); -- Self_Test_Passed : Boolean; begin Main.Initialize; Main.Run_Loop; end boot;
-- Copyright 2014-2019 Simon Symeonidis (psyomn), Patrick Kelly (entomy) -- -- 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 re...
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- ...
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
with Ada.Containers.Ordered_Maps; with Memory; package Intcode is use type Memory.Address; use type Memory.Value; package Aux_Memory is new Ada.Containers.Ordered_Maps( Key_Type => Memory.Address, Element_Type => Memory.Value); type Maybe_Memory_Value(Present: Boolean := False) is record cas...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
package body ACO.Utils.Generic_Alarms is function Get_Next_Up (This : Alarm_Manager; T_Now : Ada.Real_Time.Time) return Alarm_Access is use type Ada.Real_Time.Time; begin if not This.Alarm_List.Is_Empty then declare Next : constant Alarm_Data := This.Alarm...
-- -- -- Copyright (c) 2015, John Leimon -- -- -- -- Permission to use, copy, modify, and/or distribute this software for any ...
with Ada.Text_IO; use Ada.Text_IO; with Input; use Input; procedure Day10 is procedure Print_Grid (Points : Point_Array; Min_X, Max_X, Min_Y, Max_Y : Integer) is Grid : array (Integer range Min_X .. Max_X, Integer range Min_Y .. Max_Y) of Character := ...
with System.Storage_Elements; package body TLSF.Block.Operations_Old with SPARK_Mode is package SSE renames System.Storage_Elements; function Get_System_Address(Base : System.Address; Addr : Address) return System.Address with...
PACKAGE Salas IS TYPE Sala IS PRIVATE; --Constructor para crear la sala e inicializarla FUNCTION Crear_Sala ( Nombre_Sala : String; Numero_Filas : Positive; Numero_Localidades_Fila : Positive) RETURN Sala; --Devuelve el nombre de la sala ...
--PRÁCTICA 3: CÉSAR BORAO MORATINOS (Chat_Messages.adb) with Ada.Text_IO; with Lower_Layer_UDP; with Ada.Strings.Unbounded; package body Chat_Messages is package ATI renames Ada.Text_IO; use Ada.Strings.Unbounded; procedure Init_Message (Server_EP: LLU.End_Point_Type; Client_EP_Receive: LLU.End_Poin...
pragma License (Unrestricted); -- runtime unit specialized for Windows with C.winnt; package System.Stack is pragma Preelaborate; procedure Get ( TEB : C.winnt.struct_TEB_ptr := C.winnt.NtCurrentTeb; Top, Bottom : out Address); end System.Stack;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
----------------------------------------------------------------------- -- awa-settings -- Settings module -- 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 except in co...
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- Copyright (C) 2012, Stefan Berghofer -- Copyright (C) 2012, secunet Security Networks AG -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or withou...
----------------------------------------------------------------------- -- asf-beans-mappers -- Read XML managed bean declaratiosn -- Copyright (C) 2010, 2011, 2017, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -...
with AUnit.Reporter.Text; with AUnit.Run; with PBKDF2.Tests; procedure PBKDF2_Tests is procedure Runner is new AUnit.Run.Test_Runner (PBKDF2.Tests.Suite); Reporter : AUnit.Reporter.Text.Text_Reporter; begin Reporter.Set_Use_ANSI_Colors (True); Runner (Reporter); end PBKDF2_Tests;
----------------------------------------------------------------------- -- servlet-core-configs -- Read servlet configuration files -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not us...
with ada.text_io, ada.integer_text_io; use ada.text_io, ada.integer_text_io; with ada.text_io, ada.integer_text_io; use ada.text_io, ada.integer_text_io; with multiplosdetres; procedure prueba_multiplosdetres is n1, n2, resultado :integer:=0; begin -- caso de prueba 1: n1:=5; n2:=15; put("El resul...
with Ada.Text_IO; use Ada.Text_IO; procedure Read_And_Write_File_Line_By_Line is Input, Output : File_Type; begin Open (File => Input, Mode => In_File, Name => "input.txt"); Create (File => Output, Mode => Out_File, Name => "output.txt"); loop declare ...
with Ada.Exceptions.Finally; with Ada.Unchecked_Deallocation; package body Ada.Command_Line.Generic_Parsing is pragma Check_Policy (Trace => Ignore); procedure Retain (Context : not null Argument_Context_Access); procedure Retain (Context : not null Argument_Context_Access) is begin Context.Reference...
with Ada.Text_IO; procedure Best_Shuffle is function Best_Shuffle(S: String) return String is T: String(S'Range) := S; Tmp: Character; begin for I in S'Range loop for J in S'Range loop if I /= J and S(I) /= T(J) and S(J) /= T(I) then Tmp := T(I); ...
with Ada.Text_IO; use Ada.Text_IO; procedure Adventofcode.Day_12.Main is begin Put_Line ("Day-12"); end Adventofcode.Day_12.Main;
with ada.unchecked_Deallocation, ada.Containers.generic_array_Sort; package body impact.d2.Broadphase is use type int32; procedure free is new ada.Unchecked_Deallocation (int32_array, int32_array_view); procedure free is new ada.Unchecked_Deallocation (b2Pairs, b2Pairs_view); function to...
-- specification of the package - -- read this to get an overview of the package; -- see bubble.adb for the implementation package Bubble is -- state shared by all tasks (ie threads) protected State is -- a setter for a, b, c, d procedure Set_All(a, b, c, d : Integer); -- get a, b, c...
--- kernel/src/gtkada-search_entry.ads.orig 2021-06-15 05:19:41 UTC +++ kernel/src/gtkada-search_entry.ads @@ -35,7 +35,7 @@ package Gtkada.Search_Entry is function Get_Icon_Position (Self : access Gtkada_Search_Entry_Record'Class; - Event : Gdk_Event_Button) return Gtk_Entry_Icon_Position; + E...
-- 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...
with raylib; package Surface is type Actor is interface; procedure Setup (ctxt : in out Actor) is abstract; procedure Update (ctxt : in out Actor ; dt : Float) is abstract; type Reference is access Actor'class; type Actor_Stack is array (Positive range <>) of Reference; type Instance is new Actor...
with Ada.Unchecked_Conversion; with System.Tasks; package body Ada.Task_Termination is use type Task_Identification.Task_Id; function To_Private is new Unchecked_Conversion ( Task_Identification.Task_Id, System.Tasks.Task_Id); function To_Private is new Unchecked_Conversion ( ...