content
stringlengths
23
1.05M
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Elements.Operator_Symbols; package Program.Elements.Infix_Operators is pragma Pure (Program.Elements.In...
with AUnit.Reporter.Text; with AUnit.Run; with Rewriters_Lib_Suite; use Rewriters_Lib_Suite; procedure Test_Rewriters_Lib is procedure Runner is new AUnit.Run.Test_Runner (Suite); Reporter : AUnit.Reporter.Text.Text_Reporter; begin Runner (Reporter); end Test_Rewriters_Lib;
-- Demonstration for the behaviors of unhandled exceptions. with Ada.Exceptions; with Ada.Interrupts.Names; with Ada.Task_Identification; with Ada.Task_Termination; procedure exception_unhandled is begin -- terminate a task by unhandled exception declare task T; task body T is begin Ada.Debug.Put ("in task T...
private with Qweyboard; private with Qweyboard.Emulation; private with Configuration; private with Logging; package Input_Backend is task Input is entry Ready_Wait; end Input; private use Logging; use Qweyboard; end Input_Backend;
----------------------------------------------------------------------- -- Memory Events - Definition and Analysis of memory events -- Copyright (C) 2014, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may ...
----------------------------------------------------------------------- -- AWA.Settings.Models -- AWA.Settings.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-...
-- POK header -- -- The following file is a part of the POK project. Any modification should -- be made according to the POK licence. You CANNOT use this file or a part -- of a file for your own project. -- -- For more information on the POK licence, please see our LICENCE FILE -- -- Pleas...
with Slice8_Pkg2; generic with package Str is new Slice8_Pkg2 (<>); package Slice8_Pkg3 is function Get return Str.Paragraph; end Slice8_Pkg3;
package body Benchmark.Matrix.Cholesky is function Create_Cholesky return Benchmark_Pointer is begin return new Cholesky_Type; end Create_Cholesky; procedure Run(benchmark : in Cholesky_Type) is addr : Natural; begin for i in 0 .. benchmark.size - 1 loop addr := i * benchmar...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure tri_sel is N : constant Integer := 8; tab : array (1..N) of Integer := (7, 8, 6, 5, 4, 3, 2, 1); tmp, minI : Integer; begin for i in 1..N-1 loop for k in 1..N loop Put(tab(k)); en...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with GID.Buffering; use GID.Buffering; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package body GID.Decoding_PNM is ---------- -- Load -- ---------- procedure Load (image: in out Image_descriptor) is procedure Row_start(y: Natural) is begin ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with System.Native_Time; package body System.Native_Real_Time is -- implementation function To_Native_Time (T : Duration) return Native_Time is begin return C.stdint.uint64_t'Integer_Value (T); end To_Native_Time; function To_Duration (T : Native_Time) return Duration is begin return D...
with ada.strings.unbounded; use ada.strings.unbounded; with ada.text_io; use ada.text_io; package text_file is -- Ecriture une chaîne dans un fichier procedure write_string_to_file(file_path, content : string); -- Lire le fichier dans la chaîne procedure read_file_to_string(file_path : string; conten...
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; package smmintrin_h is -- Copyright (C) 2007-2017 Free Software Foundation, Inc. -- This file is part of GCC. -- GCC is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public L...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with Ada.Finalization; with GL.Types; private with GL.Low_Level; package GL.Objects is pragma Preelaborate; use GL.Types; type Access_Kind is (Read_Only, Write_Only, Read_Write); type ...
-- Institution: Technische Universitaet Muenchen -- Department: Realtime Computer Systems (RCS) -- Project: StratoX -- Author: Martin Becker (becker@rcs.ei.tum.de) with Ada.Text_IO; -- TODO: remove -- @summary -- implements ULOG GPS message package body ULog.GPS with SPARK_Mode is overriding pro...
with OpenGL.Generic_Buffers; with OpenGL.Programs; package Cube_Programs is type Vertex_Data is record Vertex_Position : OpenGL.GLfloat_Vector_3; Vertex_Color : OpenGL.GLfloat_Vector_3; end record; type Vertex_Data_Array is array (Positive range <>) of Vertex_Data; package Vertex_Data_Bu...
package Standard is type Boolean is (False, True); type Integer is range -2 ** 31 .. 2 ** 31 - 1; subtype Natural is Integer range 0 .. Integer'Last; subtype Positive is Integer range 1 .. Integer'Last; type Float is digits 6 range -16#0.FFFF_FF#E32 .. 16#0.FFFF_FF#E32; type Character is ('x');...
with Ada.Text_IO; with Square_Root; procedure Main is begin Ada.Text_IO.Put_Line (Square_Root.Sqrt(2.0, 0.00001)'Image); end Main;
package body Ada.Exception_Identification is pragma Suppress (All_Checks); function Exception_Name (Id : Exception_Id) return String is begin if Id = null then raise Constraint_Error; else declare Full_Name_All : String (1 .. Id.Name_Length - 1); for Full_...
-- -- Copyright (C) 2021 Jeremy Grosser <jeremy@synack.me> -- -- SPDX-License-Identifier: BSD-3-Clause -- with Random; with Sound; package body Game is function To_Screen_Coordinate (Y : Grid_Row; X : Grid_Column) return Screen_Coordinate is (Y => Graphics.Row'First + (Y - Grid_Row'First) *...
with Ada.Text_IO; use ADA.Text_IO; procedure main is procedure extended_gcd(a : Integer; b : Integer) is old_r : Integer := a; r : Integer := b; old_s : Integer := 1; s : Integer := 0; old_t : Integer := 0; t : Integer := 1; quotient : Integer; temp : Integer; begin while r /= 0 loop quotient := old_r...
limited with Limited_With4_Pkg; package Limited_With4 is type Ptr1 is access procedure (A : Limited_With4_Pkg.Rec12; I : Integer); type Ptr2 is access procedure (A : Limited_With4_Pkg.Rec22; I : Integer); type Rec1 is record I : Integer; end record; procedure Proc1 (A : Limited_With4_Pkg.Rec12 ; I : ...
with Ada.Finalization; with Lexer.Source; package Lexer.Base is pragma Preelaborate; Default_Initial_Buffer_Size : constant := 8192; type Buffer_Type is access all String; type Private_Values is limited private; type Instance is limited new Ada.Finalization.Limited_Controlled with record Cur_...
with Ada.Text_IO, Ada.Strings.Fixed; procedure Range_Extract is type Sequence is array (Positive range <>) of Integer; function Img(I: Integer) return String is -- the image of an Integer begin return Ada.Strings.Fixed.Trim(Integer'Image(I), Ada.Strings.Left); end Img; function Img(S: Se...
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (gh+flacada@heisenbug.eu) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam ...
with Interfaces; package Opt61_Pkg is subtype Int64 is Interfaces.Integer_64; procedure Double_Divide (X, Y, Z : Int64; Q, R : out Int64; Round : Boolean); end Opt61_Pkg;
--- kernel/src/filter_panels.adb.orig 2021-06-18 05:08:58 UTC +++ kernel/src/filter_panels.adb @@ -26,6 +26,7 @@ with Gdk.Event; use Gdk.E with Gtk.GEntry; use Gtk.GEntry; with Gtk.Menu_Item; use Gtk.Menu_Item; with Gtk.Separator_Menu_Item; use Gtk.Separator_Menu_Item; +with ...
separate (Numerics.Sparse_Matrices) procedure Convert (Mat : in out Sparse_Matrix) is N : constant Pos := Pos'Max (Mat.N_Col, Mat.N_Row); Row : Int_Array (1 .. N + 1) := (others => 0); Count : Int_Array (1 .. N + 1) := (others => 0); Nmax : constant Pos := Pos (Mat.X.Length); X : Real_V...
with Rejuvenation.Match_Patterns; use Rejuvenation.Match_Patterns; package Placeholder_Relations is function Is_Referenced_In (Match : Match_Pattern; Definition, Context : String) return Boolean; function Is_Constant_Expression (Match : Match_Pattern; Expression : String) ...
with RP.PWM; package Sound is type Octaves is range 0 .. 11; type Notes is (C, Cs, D, Ds, E, F, Fs, G, Gs, A, As, B); subtype Milliseconds is Natural; procedure Initialize; procedure Update; procedure Play (Note : Notes; Octave : Octaves; Length : Milliseconds); -- Length...
with Interfaces; use Interfaces; package OLED_SH1106.Display is OLED_RST : constant Unsigned_16 := 25; OLED_DC : constant Unsigned_16 := 24; OLED_CS : constant Unsigned_16 := 8; KEY_UP_PIN : constant Unsigned_16 := 6; KEY_DOWN_PIN : constant Unsigned_16 := 19; KEY_LEFT_PIN : constant...
with Ada.Calendar.Naked; with Ada.Exception_Identification.From_Here; with System.Zero_Terminated_WStrings; with C.winbase; with C.winnt; package body Ada.Directories.Information is use Exception_Identification.From_Here; use type Exception_Identification.Exception_Id; use type C.size_t; use type C.windef.D...
-------------------------------------------------------------------------------- -- Copyright (C) 2020 by Heisenbug Ltd. (gh+si_units@heisenbug.eu) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by S...
with Tictactoe; use Tictactoe; with Ada.Text_IO; use Ada.Text_IO; with Stack; use Stack; procedure Game with SPARK_Mode => On is Player_Turn : Boolean := True; begin Initialize; -- bug, forget the initialization? while not Is_Full -- bug, forget is full should kill the is_free proof? and then Won = Em...
-- Shoot'n'loot -- Copyright (c) 2021 Fabien Chouteau with Menus; procedure Main_Simulator is begin Menus.Run; end Main_Simulator;
---------------------------------------- -- Copyright (C) 2019 Dmitriy Shadrin -- -- All rights reserved. -- ---------------------------------------- with Ada.Finalization; with Formatted_Output; use Formatted_Output; with Formatted_Output.Integer_Output; with Ada.Unchecked_Conversion; -----------------...
with Ada.Real_Time; use Ada.Real_Time; package Controller is Period : constant Time_Span := Milliseconds (200); procedure Periodic_Tasks; procedure Handle_Host_Data; procedure Handle_RF_Data; procedure Send_Log_Message (Message : String); end Controller;
-- CC3016B.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...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
package Tables is procedure Foo ; end Tables; ---------------------------- package Checked_text_io is procedure Foo; end Checked_text_io; ---------------------------- package body Checked_text_io is procedure Foo is begin null; end Foo; end Checked_text_io; ---------------------------- with Checked_Text_Io; ...
----------------------------------------------------------------------- -- gen-model-list -- List bean interface for model objects -- Copyright (C) 2009, 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License...
with Ada.Numerics.Generic_Real_Arrays; with OpenGL.Thin; package OpenGL.Types is subtype Integer_t is Thin.Integer_t; subtype Float_t is Thin.Float_t; subtype Double_t is Thin.Double_t; subtype Clamped_Double_t is Double_t range 0.0 .. 1.0; subtype Clamped_Float_t is Float_t range ...
-- Task 2 of RTPL WS17/18 -- Team members: Hannes B. and Gabriel Z. with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; with Ada.Numerics.Discrete_Random; package body dice is -- Procedure for option 8 procedure opt8 is begin myDice; end opt8; -- Throwing dice procedure procedu...
-- { dg-do run } -- { dg-options "-gnata" } procedure Nested_Return_Test is function H (X: integer) return access integer is Local : aliased integer := (X+1); begin case X is when 3 => begin return Result : access integer do Result := new integer ...
with Interfaces.C.Strings; package body Sf.Audio.SoundBuffer is use Interfaces.C.Strings; --////////////////////////////////////////////////////////// --/ Create a new sound buffer and load it from a file --/ --/ @param Filename Path of the music file to open --/ --/ @return A new sfSoundBuffer...
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- ...
with Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Text_IO; use Ada.Integer_Text_IO; procedure euler is sum : integer := 0; begin for i in 1 .. 999 loop if (i mod 3) = 0 or (i mod 5) = 0 then sum := (sum + i); end if; end loop; put(Item => sum, Width => 1); new_line;...
------ FUNCIONES ANIDADAS/ RECURSIVA/ IF / LOOP procedure Hello is a: Integer; b: Float ; c: Boolean; function dos(a,b:in Integer) return Integer is function uno(a,b:in Integer) return Integer is begin Put(one); return uno(x, y); end uno; begin ...
with Ada.Text_IO; use Ada.Text_IO; procedure Test is begin Put ("Quote """ & ''' & """" & Character'Val (10)); end Test;
-- Copyright (c) 2017 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with League.JSON.Arrays; with League.JSON.Values; separate (WebDriver.Remote) package body Elements is function "+" (Text : ...
pragma Ada_2012; with Ada.Calendar.Formatting; with Ada.Exceptions; with Ada.Strings.Fixed; with Gnat.Regpat; with Protypo.Api.Engine_Values.Range_Iterators; with Protypo.Api.Engine_Values.Handlers; with Protypo.Api.Engine_Values.Engine_Value_Array_Wrappers; with Protypo.Api.Interpreters; with Protypo.Api.Callback_Uti...
-- part of ParserTools, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "copying.txt" with Ada.Text_IO; package Lexer.Source.Text_IO is -- this package provides a source type that is backed by Ada.Text_IO's file -- type. the primary use-case is to read from stdin. use Yaml...
-- ___ _ ___ _ _ -- -- / __| |/ (_) | | Common SKilL implementation -- -- \__ \ ' <| | | |__ general file interaction -- -- |___/_|\_\_|_|____| by: Timm Felden ...
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and t...
with agar.core.types; with agar.gui.rect; with agar.gui.widget.menu; with agar.gui.window; package agar.gui.widget.hsvpal is use type c.unsigned; type flags_t is new c.unsigned; HSVPAL_PIXEL : constant flags_t := 16#01#; HSVPAL_DIRTY : constant flags_t := 16#02#; HSVPAL_HFILL : constant flags_t := 16#04...
------------------------------------------------------------------------- -- GL.Geometry - GL geometry primitives -- -- Copyright (c) Rod Kay 2007 -- AUSTRALIA -- Permission granted to use this software, without any warranty, -- for any purpose, provided this copyright note remains attached -- and u...
with Ada.Text_IO; use Ada.Text_IO; procedure Test is type R is record A: Integer; end record; X : access R; begin X := null; end;
pragma Warnings (Off); pragma Style_Checks (Off); with GLOBE_3D.Math; package body GLOBE_3D.Wire_frame is procedure Display_one (o : in out Wired_3D) is begin -- Call parent method: Display_one (Object_3D (o)); -- Display the wires: if o.wire /= null then GL.PushMatrix; GL.Translate (...
-- 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...
-- This package has been generated automatically by GNATtest. -- You are allowed to add your code to the bodies of test routines. -- Such changes will be kept during further regeneration of this file. -- All code placed outside of test routine bodies will be lost. The -- code intended to set up and tear down the t...
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- separate (Jupyter.Start_Kernel) package body IO_Pubs is ------------ -- Stream -- ------------ overriding procedure Stream (Self : in ...
-- with Ada.Text_IO; use Ada.Text_IO; package body EU_Projects.Times.Time_Expressions is ------------- -- Extract -- ------------- function Extract (X : Symbolic_Instant_Array) return Time_Expr.Expression_Array is Result : Time_Expr.Expression_Array (X'Range); begin for I in X'Range lo...
-- { dg-do compile } package body task_name is task body Task_Object is begin null; end Task_Object; end;
with Ada.Unchecked_Deallocation; package body Bin_Trees is function Empty(Tree: Tree_Type) return Boolean is begin return Tree = null; end Empty; function Empty return Tree_Type is begin return null; end Empty; function Left (Tree: Tree_Type) return Tree_Type is begin retur...
-- { dg-do run } with Loop_Optimization16_Pkg; use Loop_Optimization16_Pkg; procedure Loop_Optimization16 is Counter : Natural := 0; C : constant Natural := F; subtype Index_T is Index_Base range 1 .. Index_Base (C); begin for I in Index_T'First .. Index_T'Last loop Counter := Counter + 1; ...
-- Copyright (c) 2014 onox <denkpadje@gmail.com> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND T...
-- { dg-do compile } -- { dg-options "-O -gnatn -fdump-tree-optimized" } with Opt15_Pkg; use Opt15_Pkg; procedure Opt15 is begin Trace_Inlined; end; -- { dg-final { scan-tree-dump-not "trace_inlined" "optimized" } }
----------------------------------------------------------------------- -- awa-index_arrays -- Static index arrays -- Copyright (C) 2015 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 excep...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with ObjectPack, AbstractStrategyCombinatorPackage, IntrospectorPackage, StrategyPackage; use ObjectPack, AbstractStrategyCombinatorPackage, IntrospectorPackage, StrategyPackage; package IdentityStrategy is type Identity is new AbstractStrategyCombinator and Object with null record; -------------------------------...
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Protypo.Api.Consumers.Buffers is type Buffer (<>) is new Consumer_Interface with private; type Buffer_Access is access Api.Consumers.Buffers.Buffer; function New_Buffer return Buffer_Access; procedure Destroy (Item : in out Buffer...
package Offmt_Lib.Fmt_Data is type Instance is abstract tagged private; procedure From_Frame (This : in out Instance; Frame : in out Data_Frame) is abstract; function Format (This : Instance; Kind : Format_Kind) return String is abst...
package Greetings is procedure Hello; procedure Middle; procedure Goodbye; end Greetings;
with Ada.Containers.Vectors; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; use Ada.Text_IO; package Rejuvenation.Simple_Factory is package Analysis_Units is new Ada.Containers.Vectors (Positive, Analysis_Unit); package Unbounded_Strings is new Ada.Containers.Vectors ...
-- { dg-do compile } with System; use System; procedure Array22 is type Integer_Address is mod Memory_Size; type Memory is array (Integer_Address range <>) of Character; type Chunk (First, Last : Integer_Address) is record Mem : Memory (First .. Last); end record; C : Chunk (1, 8); for C'A...
-- Copyright (c) 2020-2021 Bartek thindil Jasicki <thindil@laeran.pl> -- -- 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 vers...
-- { dg-do compile } -- { dg-options "-O2 -gnatp -Wuninitialized" } procedure Forward_Vla is function N return Natural is begin return 1; end; type Sequence; type Sequence_Access is access all Sequence; Ptr : Sequence_Access := null; -- freeze access type Sequence_Length : Natural := N; type Seq...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
-- CE2206A.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...
package body PasswordDatabase is procedure Init(D : out Database) with SPARK_Mode => Off is begin PW_Ordered_Maps.Clear(D.passwords); end Init; procedure Put(D : in out Database; U : in URL; P : in Password) is begin PW_Ordered_Maps.Include(D.passwords,U,P); end Put; procedure Remove...
-- Copyright 2019 Michael Casadevall <michael@casadevall.pro> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to -- deal in the Software without restriction, including without limitation the -- rights to use, cop...
-- POK header -- -- The following file is a part of the POK project. Any modification should -- be made according to the POK licence. You CANNOT use this file or a part -- of a file for your own project. -- -- For more information on the POK licence, please see our LICENCE FILE -- -- Pleas...
package body STM_Board is --------------------- -- Initialize_GPIO -- --------------------- procedure Initialize_GPIO is Configuration : GPIO_Port_Configuration; All_PP_Outputs : constant GPIO_Points := (Green_LED, Red_LED, Buzzer); All_PP_Inputs : constant GPIO_Points := ...
-- -- Raytracer implementation in Ada -- by John Perry (github: johnperry-math) -- 2021 -- -- implementation of Scene type and the ray tracer -- pragma Ada_2020; -- Ada packages with Ada.Numerics.Generic_Elementary_Functions; -- needed for sqrt function -- local packages with Colors; use Colors; with Objects; use...
-- Copyright (C)2021,2022 Steve Merrony -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publis...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings; use Ada.Strings; with Ada.Strings.Fixed; use Ada.Strings.Fixed; procedure StripDemo is str : String := " Jabberwocky "; begin Put_Line ("'" & Trim (str, Left) & "'"); Put_Line ("'" & Trim (str, Right) & "'"); Put_Line ("'" & Trim (str, Both) & "'"...
----------------------------------------------------------------------- -- awa-mail-clients-aws_smtp-initialize -- Initialize SMTP client with SSL support -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "Licens...
-- Mean lunar phase computations -- Given a date expressed as a decimal Julian day, -- compute the mean lunar phase (and later the next mean new moon). -- The algorithm is in the public domain ---------------------------------------------------------------------------- -- Copyright Miletus 2015 -- Permission is hereby ...
with C_String; with Interfaces.C; with Interfaces.C.Strings; package body Agar.Core.Object is package C renames Interfaces.C; package C_Strings renames Interfaces.C.Strings; use type C.int; function New_Object (Parent : in Object_Access_t; Name : in String; Object_Class : ...
-- C49022B.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...
-- 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...
----------------------------------------------------------------------- -- awa-votes-beans -- Beans for module votes -- 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 exc...
with Ada.Streams; with C.gmp; package GMP.Z.Inside is pragma Preelaborate; function Reference (X : in out MP_Integer) return not null access C.gmp.mpz_struct; function Constant_Reference (X : MP_Integer) return not null access constant C.gmp.mpz_struct; pragma Inline (Reference); -- renamed pragma Inline (...
with Ada.Text_IO; use Ada.Text_IO; procedure Adventofcode.Day_4.Main is procedure Check (Path : String) is Passports : Passport_Vector; begin Passports.Read (Path); Put_Line ("Valid_Passports =>" & Passports.Count_Valid'Img); end Check; begin Check ("src/day-4/input.test"); Check ("src/...
with TEXT_IO; with DIRECT_IO; with INFLECTIONS_PACKAGE; use INFLECTIONS_PACKAGE; with DICTIONARY_PACKAGE; use DICTIONARY_PACKAGE; package WORD_SUPPORT_PACKAGE is FOLLOWED_BY_PERIOD, FOLLOWS_PERIOD, CAPITALIZED, ALL_CAPS : BOOLEAN := FALSE; type D...