content stringlengths 23 1.05M |
|---|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Element_Vectors;
with Program.Elements.Declarations;
with Program.Elements.Defining_Names;
package Program.Elements.Enum... |
package MyCommandLine with SPARK_Mode is
function Argument_Count return Natural;
function Command_Name return String;
function Argument(Number : in Positive) return String with
Pre => Number <= Argument_Count;
end MyCommandLine;
|
with Ada.Containers;
with TLSF.Proof.Relation;
package body TLSF.Proof.Test.Relation with SPARK_Mode is
---------------
-- Test_Find --
---------------
procedure Test_Find is
use type Ada.Containers.Count_Type;
type Element is new Natural;
package Relation is new TLSF.Pro... |
with
Libadalang.Analysis,
Ada.Text_IO;
procedure launch_Test
is
use Ada.Text_IO;
package LAL renames Libadalang.Analysis;
Ctx : LAL.Analysis_Context := LAL.Create;
Unit : LAL.Analysis_Unit := LAL.Get_From_File (Ctx, "test_package.ads", With_Trivia => False);
begin
LAL.Print (Unit);
LAL... |
with AVR.Interrupts;
package body Hardware.PWM is
procedure Connect (pin : in AVR.Bit_Number; which : out Servo_Index) is
s : Servo_ptr;
begin
if (Active_Servos < Max_Servos) then
Active_Servos := Active_Servos + 1;
Servos (Active_Servos) := new Servo;
s := Servos(Active_S... |
with Ada.Streams;
with Bitmaps.RGB;
package Bitmaps.IO is
procedure Write_PPM_P6(To : not null access Ada.Streams.Root_Stream_Type'Class;
Source : in Bitmaps.RGB.Image);
end Bitmaps.IO;
|
with ada.text_io; use ada.text_io;
with spi; use spi;
with stdint_h; use stdint_h;
with Interfaces.C.Strings; use Interfaces.C.Strings;
with ada.command_line; use ada.command_line;
with ada.exceptions; use ada.exceptions;
procedure Send_Byte is
device : aliased SPI_D... |
with System;
with STM32_SVD.RCC; use STM32_SVD.RCC;
package body STM32.HASH is
procedure Enable_Hash
is
RCC : aliased RCC_Peripheral
with Import, Address => S_NS_Periph (RCC_Base);
begin
RCC.AHB2ENR.HASHEN := True;
end Enable_Hash;
procedure Init_Hash (Algorithm : Algorithm_Selec... |
with ZMQ.Sockets;
with Ada.Text_IO; use Ada.Text_IO;
with AVTAS.LMCP.Types; use AVTAS.LMCP.Types;
with UxAS.Comms.Transport.ZeroMQ_Socket_Configurations; use UxAS.Comms.Transport.ZeroMQ_Socket_Configurations;
with UxAS.Comms.Data.Addressed.Attributed; ... |
with Ada.Containers.Hashed_Maps;
generic
type Object_Type is tagged private;
package Limited_With3_Pkg1 is
type Key_Type is access all String;
type Element_Type is new Object_Type with null record;
type Element_Access is access all Element_Type;
function Equal (Left, Right : Element_Acce... |
-----------------------------------------------------------------------
-- Util testsuite - Util Testsuite
-- Copyright (C) 2009 - 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 except... |
pragma License (Unrestricted);
-- extended unit
with Ada.References.Strings;
with Ada.Streams.Block_Transmission.Strings;
with Ada.Strings.Generic_Unbounded;
package Ada.Strings.Unbounded_Strings is
new Generic_Unbounded (
Character,
String,
Streams.Block_Transmission.Strings.Read,
Streams.B... |
-- This file is generated by SWIG. Do *not* modify by hand.
--
with Interfaces.C.Extensions;
package LLVM_link_time_Optimizer is
-- lto_symbol_attributes
--
type lto_symbol_attributes is (
LTO_SYMBOL_ALIGNMENT_MASK,
LTO_SYMBOL_PERMISSIONS_RODATA,
LTO_SYMBOL_PERMISSIONS_CODE,
LTO_SYM... |
with Ada.Text_IO.Unbounded_IO;
package body MyLogger is
package UIO renames Ada.Text_IO.Unbounded_IO;
package TIO renames Ada.Text_IO;
overriding
procedure reaction (listener : CustomLogger) is
begin
if listener.is_error then
TIO.Put_Line ("## SQLSTATE: " & listener.sqlstate);
... |
limited with Actors, Engines;
package Components.Attackers is
type Attacker is tagged record
power : Health;
end record;
procedure attack(self : in out Attacker; owner : in out Actors.Actor;
target : in out Actors.Actor; engine : in out Engines.Engine);
end Components.Attackers;
|
with Ada.Text_IO;
use Ada.Text_IO;
with GNAT.Command_Line;
use GNAT.Command_Line;
with Util;
with Ada.Exceptions;
use Ada.Exceptions;
procedure Main is
Config : Command_Line_Configuration;
begin
Util.Define_CLI_Switches(Config);
Getopt(Config);
Util.Process_Command_Arguments;
exception
when E : U... |
-----------------------------------------------------------------------
-- mat-targets-gtkmat - Gtk target management
-- 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 ex... |
with
openGL.geometry.colored,
openGL.Font,
openGL.Palette;
package openGL.Model.arrow.colored
--
-- Models a colored arrow.
--
is
type Item is new openGL.Model.arrow.item with private;
type View is access all Item'Class;
---------
--- Forge
--
function new_Arrow (Color : in o... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2017 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.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with GNATtest_Generated;
package Tk.TtkFrame.Ttk_Frame_Options_Test_Data.Ttk_Frame_Options_Tests is
type Test_Ttk_Frame_Options is new GNATtest_Generated.... |
-- SipHash.General
-- Implementing SipHash over a general private type
-- Copyright (c) 2015, James Humphry - see LICENSE file for details
-- This generic function will calculate SipHash for any private type of definite
-- size
generic
type T is private;
type Hash_Type is mod <>;
function SipHash.General (m : T... |
package body AFRL.CMASI.AutomationRequest.SPARK_Boundary with SPARK_Mode => Off is
--------------------
-- Get_EntityList --
--------------------
function Get_EntityList
(Request : AutomationRequest) return Int64_Vect
is
L : constant Vect_Int64_Acc := Request.getEntityList;
begin
re... |
with impact.d3.union_Find;
with impact.d3.Manifold;
-- #include "btCollisionCreateFunc.h"
-- #include "LinearMath/btAlignedObjectArray.h"
with impact.d3.Object;
--
-- class impact.d3.Object;
-- class impact.d3.Space;
-- class impact.d3.Dispatcher;
-- class impact.d3.Manifold;
with impact.d3.Space;
with impact... |
package body Semaphores is
protected body SIMA is
entry P when Count > 0 is
begin
Count := Count - 1;
end P;
entry V when Count < Max_Count is
begin
Count := Count + 1;
end V;
end SIMA;
end Semaphores;
|
with Ada.Text_IO;
procedure Hello_World is
use Ada.Text_IO;
begin
Put_Line("Hello, World.");
end; |
-----------------------------------------------------------------------
-- ado-schemas -- Database Schemas
-- Copyright (C) 2015, 2018, 2019, 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 ... |
-----------------------------------------------------------------------
-- ado-cache -- Simple cache management
-- Copyright (C) 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except i... |
-- This spec has been automatically generated from STM32F072x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.CRS is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_SYNCOKIE_Field is STM32_SVD.... |
with Giza.Timers; use Giza.Timers;
with Ada.Real_Time; use Ada.Real_Time;
with Timer_Callback;
use Timer_Callback;
with Giza.Windows; use Giza.Windows;
with Screen_Interface; use Screen_Interface;
with Giza.Widgets.Text; use Giza.Widgets.Text;
with Giza.GUI; use Giza.GUI;
with Giza.Colors; use Giza.Colors;
with Giza.Gr... |
-- { dg-do run }
procedure Missing_Acc_Check is
Test_Failed : Exception;
type Int_Access is access all Integer;
Save : Int_Access := null;
type Int_Rec is record
Int : aliased Integer;
end record;
type Ltd_Rec (IR_Acc : access Int_Rec) is limited null record;
functio... |
with Ada.Exception_Identification.From_Here;
with System.Address_To_Named_Access_Conversions;
with C.winbase;
with C.wincrypt;
with C.windef;
with C.winerror;
package body System.Random_Initiators is
use Ada.Exception_Identification.From_Here;
use type C.windef.WINBOOL;
use type C.windef.DWORD; -- error code
... |
with
freetype.Face,
freetype.charMap;
private
with
ada.Containers.Vectors;
package openGL.Glyph.Container
--
-- Contains the post processed Glyph objects.
--
is
type Item is tagged private;
type Glyph_view is access all Glyph.item'Class;
---------
-- Forge
--
function to_g... |
with Ada.Text_IO; use Ada.Text_IO;
procedure P is
type t is record x: integer; end record;
type t is record y: integer; end record;
begin
new_line;
end;
|
-- Main SaxonSOC package
-- See https://github.com/SpinalHDL/SaxonSoc/blob/
-- bade201e38363030aab41dbec5565885a2f68dc3/bsp/radiona/ulx3s/smp/include/
-- soc.h#L64
-- with System;
package Interfaces.SaxonSOC is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Base type --
... |
-- package MWC_Constants
--
-- Multiply_with_Carry_Constants
--
-- Multiply with carry is an algorithm for calculating
--
-- a*x mod (a*b-1)
--
-- efficiently. Main benefit: even if a*x overflows 64 bit arithmetic,
-- the multiply with carry algorithm works entirely in 64 bit arithmetic.
-- No extended precision ... |
package body Coords is
function Get_X(C: Coord) return Integer is
begin
return C.x;
end;
function Get_Y(C: Coord) return Integer is
begin
return C.y;
end;
procedure Set_X(C: out Coord;x_new : Integer) is
begin
C.x := x_new;
end;
procedure Set_Y(C: out Coord;y_new : I... |
-- with Ada.Text_IO; use Ada.Text_IO;
procedure URI.Test is
T_1 : constant String :=
"http://anon:1234@www.dummy.com/highway/to/?sure&really#hell";
T_2 : constant String := "urn:example:animal:ferret:nose";
begin
-- Individual parts
pragma Assert (Extract ("", Scheme) = "");
pragma Assert... |
-- see OpenUxAS\src\Communications\AddressedAttributedMessage.h
package UxAS.Comms.Data.Addressed.Attributed is
Type_Name : constant String := "AddressedAttributedMessage";
Minimum_Delimited_Address_Attribute_Message_String_Length : constant := 11;
Address_Attributes_Delimiter : constant String := Address... |
with Arduino_Nano_33_Ble_Sense.IOs;
package Servo is
package Arduino renames Arduino_Nano_33_Ble_Sense;
subtype Angle_Range is Integer range -90 .. 90;
procedure Write(High_Time : Integer; Pin_Id : Arduino.IOs.Pin_Id);
private
Period : constant Integer := 20000;
subtype Pulse_Range is Natural range ... |
-- This file is generated by SWIG. Do *not* modify by hand.
--
with llvm;
with Interfaces.C.Strings;
package LLVM_Target.Binding is
LLVMBigEndian : constant := 0;
LLVMLittleEndian : constant := 1;
procedure LLVMInitializeAllTargets;
function LLVMInitializeNativeTarget return Interfaces.C.int;
... |
-----------------------------------------------------------------------
-- ado-configs -- Database connection configuration
-- Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version... |
with ada.characters.latin_1;
package body halfbox_info is
function to_string (halfbox_info : halfbox_info_t) return string is
tab : constant character := ada.characters.latin_1.HT;
lf : constant character := ada.characters.latin_1.LF;
begin
return "[ " & lf
& tab & "t: " & i... |
-----------------------------------------------------------------------
-- util-encoders-ecc -- Error Correction Code
-- Copyright (C) 2019 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... |
with Ada.Numerics.Generic_Elementary_Functions;
package body Generic_Quaternions is
package Elementary_Functions
is new Ada.Numerics.Generic_Elementary_Functions (Real);
use Elementary_Functions;
function "-" (Q : Quaternion) return Quaternion
is (-Q.W, -Q.X, -Q.Y, -Q.Z);
function "+" (L, R : Quat... |
-- 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 Ada.Text_IO, Ada.Integer_Text_IO, Ada.Strings.Unbounded,
Ada.Strings.Unbounded.Text_IO, Ada.Numerics.Long_Elementary_Functions,
Ada.Long_Float_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Strings.Unbounded,
Ada.Strings.Unbounded.Text_IO, Ada.Numerics.Long_Elementary_Functions,
Ada.Long_Float_Text_IO... |
with DDS.DomainParticipantListener;
with DDS.Treats_Generic;
with DDS.Entity;
with DDS.DomainParticipant;
with DDS.TopicListener;
with DDS.Topic;
with DDS.DomainParticipantFactory;
package DDS.Request_Reply is
type Ref is limited interface;
type Ref_Access is access all Ref'Class;
procedure DDSLog_Exception ... |
pragma License (Unrestricted);
-- implementation unit specialized for POSIX (Darwin, FreeBSD, or Linux)
with Ada.Colors;
package System.Native_Text_IO.Terminal_Colors is
pragma Preelaborate;
type Color is mod 256;
-- Note: Color represents:
-- 0 .. 7 => Normal System Colors (R, G, B => 0 or 16#C0#)... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Scanner_States;
package Program.Source_Buffers is
pragma Pure;
type Source_Buffer is limited interface;
-- So... |
with Common_Formal_Containers; use Common_Formal_Containers;
with DOM.Core;
package UxAS.comms.LMCP_net_client.service.Example_Spark_Service is
type Example_Spark_Service is new Service_Base with private;
type Example_Spark_Service_Ref is access all Example_Spark_Service;
Type_Name : constant String := "... |
-----------------------------------------------------------------------
-- servlet-routes -- Request routing
-- Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may... |
with
FLTK.Images.RGB;
private with
Interfaces.C;
package FLTK.Widgets.Groups.Windows is
type Window is new Group with private;
type Window_Reference (Data : not null access Window'Class) is limited null record
with Implicit_Dereference => Data;
type Border_State is (None, Visible)... |
-- C45282A.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 Giza.Bitmap_Fonts.FreeSansBold8pt7b is
Font : constant Giza.Font.Ref_Const;
private
FreeSansBold8pt7bBitmaps : aliased constant Font_Bitmap := (
16#FF#, 16#FF#, 16#0F#, 16#CF#, 16#3C#, 16#F3#, 16#1B#, 16#09#, 16#BF#,
16#FF#, 16#F3#, 16#61#, 16#33#, 16#FD#, 16#FE#, 16#6C#, 16#26#, 16#00#,
16#10#, 1... |
with Units; use Units;
with Generic_Unit_Vectors;
pragma Elaborate_All(Generic_Unit_Vectors);
package CoSy with SPARK_Mode is
type Spartial_Type is new Float with
Dimension_System =>
((Unit_Name => Meter_X, Unit_Symbol => "m_x", Dim_Symbol => "Lx"),
(Unit_Name => Meter_Y, Unit_Symbol => ... |
with impact.d2.orbs.Collision,
impact.d2.Math;
package impact.d2.orbs.dynamic_Tree
--
-- A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt.
--
is
use impact.d2.Math;
b2_nullNode : constant := 0;
-- A node in the dynamic tree. The client does not interact with this directly.... |
-----------------------------------------------------------------------
-- awa-tags-beans -- Beans for the tags 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 e... |
package openGL.Server
--
-- Provides functions to query the GL server.
--
is
type a_Version is
record
Major : Integer;
Minor : Integer;
end record;
function Version return a_Version;
function Version return String;
end openGL.Server;
|
package body Solve is
function Get_Line_Integer (File : File_Type) return Integer is
Line_Buffer : Unbounded_String;
Result : Integer;
begin
Line_Buffer := Get_Line (File);
Result := Integer'Value (To_String (Line_Buffer));
return Result;
end Get_Line_Integ... |
-- FastAPI
-- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
--
-- The version of the OpenAPI document: 0.1.0
--
--
-- NOTE: This package is auto generated by OpenAPI-Generator 4.0.0.
-- https://openapi-generator.tech
-- Do not edit the class manually.... |
with AUnit.Reporter.Text;
with AUnit.Run;
with Test.Test_Suite;
procedure Test.Main is
procedure Run is new AUnit.Run.Test_Runner (Test_Suite.Suite);
Reporter : AUnit.Reporter.Text.Text_Reporter;
begin
Run (Reporter);
end Test.Main;
|
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- ... |
package body STM32F4.FMC is
procedure FMC_SDRAM_Init (SDRAM_Conf : FMC_SDRAM_Init_Config) is
Tmpr1, Tmpr2, Tmpr3, Tmpr4 : Word := 0;
begin
-- SDRAM bank control register configuration
Tmpr1 := SDRAM_Conf.ColumnBitsNumber or
SDRAM_Conf.RowBitsNumber or
SDRAM_Conf.SDMemoryDataWid... |
with Ada.Integer_Text_IO;
with Ada.Text_IO;
with PrimeInstances;
package body Problem_07 is
package IO renames Ada.Text_IO;
package I_IO renames Ada.Integer_Text_IO;
procedure Solve is
package Integer_Primes renames PrimeInstances.Integer_Primes;
Sieve : constant Integer_Primes.Sieve := Integer_Pri... |
with GA_Maths;
with Metric;
with Multivectors;
package Multivector_Type is
type MV_Type is (Unspecified_MV_Type, Multivector_Type, Versor_MV, Blade_MV);
type Parity_Type is (Odd_Parity, Even_Parity, No_Parity);
type MV_Type_Record is private;
function Grade_Use (MV : MV_Type_Record) return GA_Maths.Grad... |
--//////////////////////////////////////////////////////////
-- SFML - Simple and Fast Multimedia Library
-- Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
-- This software is provided 'as-is', without any express or implied warranty.
-- In no event will the authors be held liable for any damages arising... |
-- part of ParserTools, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
with Ada.IO_Exceptions;
package body Lexer.Base.Unicode is
function Next (Object : in out Instance'Class) return Rune is
begin
if Object.Buffer (Object.Pos) = Character'Val (4) then
... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Generic HEX String Handling Package --
-- --
-- -... |
pragma License (Unrestricted);
package GNAT.Command_Line is
-- Parsing
type Opt_Parser is null record;
Command_Line_Parser : constant Opt_Parser := (null record);
procedure Initialize_Option_Scan (
Switch_Char : Character := '-';
Stop_At_First_Non_Switch : Boolean := False;
Section_De... |
-- 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... |
package Buildinfo with SPARK_Mode is
function Compilation_ISO_Date return String -- implementation-defined (GNAT)
with Import, Convention => Intrinsic,
Global => null,
Post => Compilation_ISO_Date'Result'Length = 10;
-- returns "YYYY-MM-DD"
function Compilation_Time return String -- implement... |
-- { dg-do compile }
procedure aggr2 is
task type T_Task;
--
task body T_Task is begin null; end;
--
type Lim_Rec is record
T : T_Task;
end record;
--
generic
Formal : Lim_Rec;
package P_G is
end P_G;
--
package P is new P_G (Formal => (T => <>));
begin
null;
end;
|
-- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with GNATtest_Generated;
package Tk.Image.Bitmap.Bitmap_Options_Test_Data.Bitmap_Options_Tests is
type Test_Bitmap_Options is new GNATtest_Generated.GNATt... |
with Ada.Text_IO; use Ada.Text_IO;
procedure Test_XOR is
type Person is (John, Bob, Mary, Serena, Jim);
type Group is array (Person) of Boolean;
procedure Put (Set : Group) is
First : Boolean := True;
begin
for I in Set'Range loop
if Set (I) then
if First then
... |
-- { dg-do run }
with Renaming4; use Renaming4;
procedure Renaming3 is
type A is array(1..16) of Integer;
Filler : A := (others => 0);
begin
if B(1) /= 1 then
raise Program_Error;
end if;
end;
|
--//////////////////////////////////////////////////////////
-- SFML - Simple and Fast Multimedia Library
-- Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
-- This software is provided 'as-is', without any express or implied warranty.
-- In no event will the authors be held liable for any damages arising... |
with Runge_8th;
with Text_IO; use Text_IO;
with Orbit;
procedure runge_8th_order_demo_2 is
type Real is digits 15;
package One_Electron_Atom is new Orbit (Real);
use One_Electron_Atom;
package Orb_Integrate is new
Runge_8th (Real, Dyn_Index, Dynamical_Variable, F, "*", "+", "-", Norm);
use Or... |
Outer:
loop
-- do something
loop
-- do something else
exit Outer; -- exits both the inner and outer loops
end loop;
end loop;
|
S : String := "12345";
S := Ada.Strings.Fixed.Trim(Source => Integer'Image(Integer'Value(S) + 1), Side => Ada.Strings.Both);
|
with Card_Dir;
use Card_Dir;
package body Coords is
--1,
function Get_X(C:Coord) return Integer is
begin
return C.x;
end Get_X;
function Get_Y(C:Coord) return Integer is
begin
return C.y;
end Get_Y;
--2,
procedure Set_X(C: in out Coord;I:Integer) is
begin
C.x:=I;
end Set_X;
procedure Set_Y(C: i... |
package CSS.Analysis.Parser.Parser is
error_count : Natural := 0;
function Parse (Content : in String) return Integer;
end CSS.Analysis.Parser.Parser;
|
procedure Procedure_Pragma is
-- Declare then export an Integer entity called num_from_Ada
My_Num : Integer := 10;
pragma Export (C, My_Num, "num_from_Ada");
-- Declare an Ada function spec for Get_Num, then use
-- C function get_num for the implementation.
function Get_Num return Integer;
pra... |
with RASCAL.ToolboxQuit; use RASCAL.ToolboxQuit;
with RASCAL.TaskManager; use RASCAL.TaskManager;
with RASCAL.OS; use RASCAL.OS;
package Controller_Quit is
type TEL_Quit_Quit is new ATEL_Toolbox_Quit_Quit with null record;
type MEL_Message_Quit is new AMEL_Message_Quit ... |
package Pkg is
type Alpha is abstract tagged record
data_alpha : Integer;
end record;
procedure func_alpha (x: in out Alpha) is abstract;
type Beta is interface;
procedure func_beta (x: in out Beta) is abstract;
type Gamma is new Alpha and Beta with record
data_gamma : Integer;
end record;
procedure func_alpha (x:... |
with Ada.Text_IO;
with Ada.Command_Line;
with Templates_Parser;
with CLIC.TTY;
with Filesystem;
with Commands;
with Ada.Characters.Handling;
with Globals;
package body Blueprint is
package IO renames Ada.Text_IO;
package TT renames CLIC.TTY;
package FS renames Filesystem;
function Get_Blueprint_Folder re... |
with Ada.Integer_Text_IO;
use Ada.Integer_Text_IO;
with Ada.Float_Text_IO;
use Ada.Float_Text_IO;
with Text_IO;
use Text_IO;
procedure Flow
is
function Distance(Flow1 : Float; Flow2 : Float)
return Float
is
begin
return abs(Flow1 - Flow2);
end Distance;
-- AdjustDistance attempts ... |
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
with Ada.Characters.Wide_Wide_Latin_1;
with Ada.Exceptions;
with Ada.Streams;
with Ada.Wide_Wide_Text_IO;
with League.JSON.Objects;
with League.JSON.Val... |
generic
type Element_Type is private;
package Linked_List is
type List_Type is limited private;
...
private
type List_Element;
type List_Element_Ptr is access list_element;
type List_Element is
record
Prev : List_Element_Ptr;
Data : Element_Type;
Next : List_Element_Ptr;
end record;
... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
package body STM32.SAU is
type RLAR_Overlay
(As_32Bit : Boolean := False)
is record
case As_32Bit is
when False =>
Val : HAL.UInt32;
when True =>
Reg : SAU_RLAR_Register;
end case;
end record
with Unchecked_Union, Size => 32;
procedure Add_Re... |
-- 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... |
with Ada.Text_IO; with Ada.Numerics.Discrete_Random;
procedure Bias_Unbias is
Modulus: constant Integer := 60; -- lcm of {3,4,5,6}
type M is mod Modulus;
package Rand is new Ada.Numerics.Discrete_Random(M);
Gen: Rand.Generator;
subtype Bit is Integer range 0 .. 1;
function Biased_Bit(Bias_Base: In... |
-------------------------------------------------------------------------------
-- 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... |
-- Elf Password class
package Password is
function part1_count(first : in Natural; last : in Natural) return Natural;
function part2_count(first : in Natural; last : in Natural) return Natural;
end Password;
|
pragma License (Unrestricted);
with C.stdlib;
package System.CRTL is
pragma Preelaborate;
subtype size_t is C.size_t;
-- Other C runtime functions
procedure free (Ptr : System.Address)
renames C.stdlib.free;
function malloc (Size : size_t) return System.Address
renames C.stdlib.malloc;
... |
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
-- type Number_Of_Tests_T is ?
-- type Test_Score_Total_T is ?
-- Number_Of_Tests : Number_Of_Tests_T;
-- Test_Score_Total : Test_Score_Total_T;
-- type Degrees_T is ?
-- Angle : Degrees_T;
-- type Cymk_T is ?
-- Color : Cymk_T;
b... |
with Ada.Text_IO; use Ada.Text_IO;
with Increment_By;
procedure Show_Increment_2 is
A, B, C : Integer;
procedure Display_Result is
begin
Put_Line ("Increment of " & Integer'Image(A)
& " with " & Integer'Image(B)
& " is " & Integer'Image(C));
end Display_Result;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.