content stringlengths 23 1.05M |
|---|
-----------------------------------------------------------------------
-- net-protos-dispatchers -- Network protocol dispatchers
-- Copyright (C) 2016, 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may no... |
-- © Copyright 2000 by John Halleck, All rights reserved.
-- Basic Definitions for NSA's Secure Hash Algorithm.
-- This code implements SHA-1 defined in FIPS PUB 180-1, 17 April 1995.
-- It is part of a project at http://www.cc.utah.edu/~nahaj/
with Interfaces; use Interfaces;
-- The only modular types for whi... |
with Project_Processor.Configuration;
with Project_Processor.Parsers.Abstract_Parsers;
with Project_Processor.Parsers.Parser_Tables;
-- with Project_Processor.Parsers.XML_Parsers;
with EU_Projects.Projects;
with Project_Processor.Processors.Processor_Tables;
use Project_Processor.Processors;
use Project_Processor.Par... |
-- { dg-do compile }
package Static_Initializer4 is
type R is tagged record
b : Boolean;
end record;
type NR is new R with null record;
C : NR := (b => True);
end Static_Initializer4;
|
separate (SPARKNaCl)
procedure Sanitize_U16 (R : out U16) is
begin
R := 0;
pragma Inspection_Point (R); -- See RM H3.2 (9)
-- Add target-dependent code here to
-- 1. flush and invalidate data cache,
-- 2. wait until writes have committed (e.g. a memory-fence instruction)
-- 3. whatever else is r... |
-- 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... |
with Ada.Long_Integer_Text_IO;
-- Copyright 2021 Melwyn Francis Carlo
procedure A015 is
use Ada.Long_Integer_Text_IO;
Input_Grid_Dimension : constant Integer := 20;
Routes_N : Long_Float := 1.0;
begin
for I in 1 .. Input_Grid_Dimension loop
Routes_N := Routes_N * (Long_Float (I + Input_Grid_Di... |
-------------------------------------------------------------------------------
-- 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... |
pragma License (Unrestricted);
with Ada.Formatting;
with Ada.IO_Exceptions;
with Ada.IO_Modes;
with Ada.Unchecked_Deallocation;
private with Ada.Finalization;
private with Ada.Naked_Text_IO;
private with Ada.Unchecked_Reallocation;
private with System.Growth;
package Ada.Text_IO is
type File_Type is limited private... |
-- CC1204A.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... |
-- { dg-do compile }
-- { dg-options "-O3" }
package body Opt56 is
function F (Values : Vector) return Boolean is
Result : Boolean := True;
begin
for I in Values'Range loop
Result := Result and Values (I) >= 0.0;
end loop;
return Result;
end;
end Opt56;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired)
--
-- Copyright William A. Whitaker (1936–2010)
--
-- This is a free program, which means it is proper to copy it and pass
-- it on to your friends. Consider it a developmental item for which
-- there is no charge. However, just for form, it is C... |
with Ada.Text_IO;
with Ada.Containers.Ordered_Sets;
package body Problem_42 is
-- The nth term of the sequence of triangle numbers is given by t_n = 1/2n(n+1);
-- so the first ten triangle numbers are:
-- 1, 3, 6, 10, 15, 21, 28, 36, 45, 55
--
-- By converting each letter in a word to a number correspo... |
-- { dg-do compile }
-- { dg-error "not marked Inline_Always" "" { target *-*-* } 0 }
-- { dg-error "cannot be inlined" "" { target *-*-* } 0 }
with Inline3_Pkg; use Inline3_Pkg;
procedure Inline3 is
begin
Test (0);
end;
|
-- Ada_GUI implementation based on Gnoga. Adapted 2021
-- --
-- GNOGA - The GNU Omnificent GUI for Ada --
-- --
-- G N O ... |
<AnimDB FragDef="chrysalis/characters/human/male/male_fragment_ids.xml" TagDef="chrysalis/characters/human/male/male_tags.xml">
<FragmentList>
<Idle>
<Fragment BlendOutDuration="0.2" Tags="Alerted+ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
... |
with Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with TOML;
procedure Main is
Table1 : constant TOML.TOML_Value := TOML.Create_Table;
Table2 : constant TOML.TOML_Value := TOML.Create_Table;
Table3 : constant TOML.TOML_Value := TOML.Create_Table;
Arr : constant TOML.TOML_Value :=... |
package body agar.gui.widget.fixed is
package cbinds is
procedure put
(fixed : fixed_access_t;
child : child_access_t;
x : c.int;
y : c.int);
pragma import (c, put, "AG_FixedPut");
procedure size
(fixed : fixed_access_t;
child : child_access_t;
... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2019 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 file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.Pointers is
-- xcb_connection_t_Pointer
--
package C_xcb_connection_t_Pointers is new interfaces.c.Pointers
(Index => interfaces.c.size_t,
Element ... |
-----------------------------------------------------------------------
-- util-http-cookies -- HTTP Cookies
-- 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 may not use this file excep... |
-- 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... |
package body types.c
with spark_mode => off
is
function len (s : c_string) return natural
is
len : natural := 0;
begin
for i in s'range loop
exit when s(i) = nul;
len := len + 1;
end loop;
return len;
end len;
procedure to_ada
(dst : out string;
... |
--
-- Copyright (c) 2002-2003, David Holm
-- 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 of source code must retain the above copyright notice,
-- this ... |
-- { dg-do compile }
-- { dg-options "-O2" }
package body Case_Optimization1 is
function F (Op_Kind : Internal_Operator_Symbol_Kinds) return Integer is
begin
case Op_Kind is
when A_Not_Operator => return 3;
when An_Exponentiate_Operator => return 2;
when others => return 1;
... |
pragma Warnings (Off);
pragma Style_Checks (Off);
-- VRML : [#VRML V1.0 ascii
-- ]
with GLOBE_3D;
package SkotKnot is
procedure Create (
object : in out GLOBE_3D.p_Object_3D;
scale : GLOBE_3D.Real;
centre : GLOBE_3D.Point_3D
);
end;
|
------------------------------------------------------------------------------
-- Copyright (c) 2015, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
with Ada.Text_IO;
use Ada.Text_IO;
with Linked_List_Pkg;
procedure demo is
package List is new Linked_List_Pkg(Integer);
use List;
L : Linked_List;
begin
Put_Line(Boolean'Image(Is_Empty(L)));
end demo;
|
package body iconv.Inside is
function Version return String is
begin
raise Program_Error;
return "glibc";
end Version;
procedure Iterate (Process : not null access procedure (Name : in String)) is
begin
raise Program_Error;
end Iterate;
end iconv.Inside;
|
package Pck is
type Data_Small is array (1 .. 2) of Integer;
type Data_Large is array (1 .. 4) of Integer;
function Create_Small return Data_Small;
function Create_Large return Data_Large;
end Pck;
|
package Giza.Bitmap_Fonts.FreeSerifBold8pt7b is
Font : constant Giza.Font.Ref_Const;
private
FreeSerifBold8pt7bBitmaps : aliased constant Font_Bitmap := (
16#FF#, 16#F4#, 16#90#, 16#FF#, 16#80#, 16#CF#, 16#3C#, 16#E3#, 16#88#,
16#12#, 16#32#, 16#36#, 16#7F#, 16#24#, 16#24#, 16#24#, 16#FE#, 16#64#,
16#6C#,... |
package UxAS.Comms.Transport is
type Transport_Base is abstract tagged limited record
-- these are public member data in the C++ version so they are visible
-- in this base class (even if extensions are private, as they should
-- be)
Entity_Id : UInt32;
Service_Id : UInt32;
end ... |
package body ACO.Utils.Scope_Locks is
protected body Mutex
is
entry Seize when Is_Free
is
begin
Is_Free := False;
end Seize;
procedure Release
is
begin
Is_Free := True;
end Release;
end Mutex;
overriding
procedure Initialize
(Thi... |
-- CZ1101A.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.
-- Unlim... |
package Utilities is
function Slurp (Filename : String) return String;
end Utilities;
|
with Asis;
package FP_Detect is
type FP_Type_Code is (F, LF, SF);
type FP_Type is
record
Precision : Positive;
Name : Asis.Defining_Name;
Is_Standard : Boolean;
Code : FP_Type_Code;
end record;
type FP_Operator_Kind is (Field_Op, Elementary_Fn... |
------------------------------------------------------------------------------
-- Copyright (c) 2014-2017, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
with
AdaM.Factory,
AdaM.Declaration.of_package;
package body AdaM.context_Line
is
-- Storage Pool
--
record_Version : constant := 1;
max_context_Lines : constant := 5_000;
package Pool is new AdaM.Factory.Pools (".adam-store",
... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Sockets; use GNAT.Sockets;
procedure DNSQuerying is
Host : Host_Entry_Type (1, 1);
Inet_Addr_V4 : Inet_Addr_Type (Family_Inet);
begin
Host := Get_Host_By_Name (Name => "www.kame.net");
Inet_Addr_V4 := Addresses (Host);
Put ("IPv4: " & Image... |
with Ada.Text_IO; use Ada.Text_IO;
package body AssignmentByIfExamples is
function Example1_Pattern1 (condition : Boolean) return Boolean;
function Example1_Pattern1 (condition : Boolean) return Boolean is
variable : Boolean;
begin
if condition then
variable := True;
else
... |
pragma License (Unrestricted);
-- implementation unit specialized for FreeBSD (or Linux)
with System.Storage_Elements;
package System.Unbounded_Allocators is
-- Separated storage pool for local scope.
pragma Preelaborate;
type Unbounded_Allocator is limited private;
procedure Initialize (Object : in out... |
Delete_File ("input.txt");
Delete_File ("/input.txt");
Delete_Tree ("docs");
Delete_Tree ("/docs");
|
-- 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... |
-- Copyright 2021 Jeff Foley. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local url = require("url")
name = "DNSDumpster"
type = "scrape"
function start()
set_rate_limit(1)
end
function vertical(ctx, domain)
local u = "https://dnsdum... |
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 plus_petit is
type stringptr is access all char_array;
procedure PInt(i : in Integer) is
begin
String'Write (Text_Streams.... |
package body Array27_Pkg is
function F return Inner_Type is
begin
return "123";
end;
end Array27_Pkg;
|
-----------------------------------------------------------------------
-- awa-counters-components -- Counter UI component
-- 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 fi... |
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Definitions;
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Constraints;
package Program.Ele... |
with Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Hash;
with Ada.Containers.Vectors;
with Ada.Containers.Hashed_Maps;
with Ada.Text_IO;
package GPR_Tools.Pkg2gpr is
use Ada.Strings.Unbounded;
package String_Vectors is new Ada.Containers.Vectors (Natural, Unbounded_String);
package String_Maps is new A... |
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.IWDG is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype KR_KEY_Field is HAL.UInt16;
-- ... |
-- domain types package: ${self.name}
-- description: self.description
with Application_Types;
with Ada.Unchecked_Conversion;
with Ada.Finalization;
with Root_Object;
package ${self.name} is
type Domain_Structure is new Ada.Finalization.Controlled with null record;
|
-- C44003G.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 COMPILER COMPONENTS --
-- --
-- ... |
--
-- Copyright (C) 2021 Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: BSD-3-Clause
--
with Picosystem.Screen;
package Graphics is
subtype Row is Integer range 1 .. Picosystem.Screen.Height;
subtype Column is Integer range 1 .. Picosystem.Screen.Width;
type Frame_Number is mod 2 ** 32... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with System.Storage_Pools.Subpools;
with Program.Element_Vectors;
with Program.Elements.Expressions;
with Program.Elements.Array_Comp... |
package Long_Multiplication is
type Number (<>) is private;
Zero : constant Number;
One : constant Number;
function Value (Item : in String) return Number;
function Image (Item : in Number) return String;
overriding
function "=" (Left, Right : in Number) return Boolean;
function "+" (Left, ... |
with Ada.Unchecked_Conversion;
package body C is
use Interfaces.C;
function U is new Ada.Unchecked_Conversion (Int, Unsigned);
function I is new Ada.Unchecked_Conversion (Unsigned, Int);
function Bool_to_Int (Val: Boolean) return Int is
begin
if Val = False then return 0; else return 1; end if;... |
with Ada.Strings.Fixed, Ada.Text_IO;
use Ada.Strings, Ada.Text_IO;
procedure String_Replace is
Original : constant String := "Mary had a @__@ lamb.";
Tbr : constant String := "@__@";
New_Str : constant String := "little";
Index : Natural := Fixed.Index (Original, Tbr);
begin
Put_Line (Fixed.Replace_Slic... |
with Plugins.Tables;
package Project_Processor.Processors.Processor_Tables is
new Plugins.Tables (Root_Plugin_Type => Abstract_Processor,
Plugin_Parameters => Processor_Parameter,
Plugin_ID => Processor_ID,
Constructor => Create);
|
-- 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... |
package Rational_Arithmetic is
-- Whole numbers
type Whole is new Integer;
--
-- Undefine unwanted operations
function "/" (Left, Right: Whole) return Whole is abstract;
--
-- Rational numbers
--
type Rational is private;
--
-- Constructors
--
function "/" (Left, Right: Whole) return Rational;
--
-- R... |
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
-- limited -- with GStreamer.GST_Low_Level.glib_2_0_gobject_gclosure_h;
with glib;
with glib;
with glib.Values;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmarshal_h is
-- unsupported m... |
with Interfaces;
with Fmt.Generic_Mod_Int_Argument;
package Fmt.Uint16_Argument is
new Generic_Mod_Int_Argument(Interfaces.Unsigned_16);
|
package body System.Wid_Enum is
function Width_Enumeration_8 (
Names : String;
Indexes : Address;
Lo, Hi : Natural)
return Natural
is
pragma Unreferenced (Names);
type Index_Type is mod 2 ** 8;
type Index_Array_Type is array (0 .. Hi + 1) of Index_Type;
Indexes_All... |
with Ada.Execution_Time,
Ada.Integer_Text_IO,
Ada.Real_Time,
Ada.Text_IO;
with Utils;
procedure Main is
use Ada.Execution_Time,
Ada.Real_Time,
Ada.Text_IO;
use Utils;
subtype Adjacent_Index is Integer range -1 .. 1;
type Adjacent_Location is record
Line : Adjacent_Ind... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Shoot'n'loot
-- Copyright (c) 2020 Fabien Chouteau
with Sound;
with Game_Assets.Tileset;
with Game_Assets.Tileset_Collisions;
with Game_Assets.Misc_Objects; use Game_Assets.Misc_Objects;
with GESTE_Config; use GESTE_Config;
with GESTE.Tile_Bank;
with GESTE.Sprite;
package body Chests is
Closed_Til... |
package agar.gui.rect is
type rect_t is record
x : c.int;
y : c.int;
w : c.int;
h : c.int;
end record;
type rect_access_t is access all rect_t;
pragma convention (c, rect_access_t);
pragma convention (c, rect_t);
type rect2_t is record
x1 : c.int;
y1 : c.int;
w : c.int;
h ... |
with LV.Color_Types;
package Lv.Color is
subtype Color_T is LV.Color_Types.Color_T;
subtype Color_Int_T is LV.Color_Types.Color_Int_T;
subtype Opa_T is Uint8_T;
type Color_Hsv_T is record
H : aliased Uint16_T;
S : aliased Uint8_T;
V : aliased Uint8_T;
end record;
pragma Conventio... |
generic
package Nested_Generic1_Pkg is
type Element_Renderer is access procedure;
generic procedure Image_Generic (Renderer : in not null Element_Renderer);
end Nested_Generic1_Pkg;
|
with Ada.Text_IO;
procedure pkgversion is
begin
Ada.Text_IO.Put_Line (Ada.Text_IO'Version);
end pkgversion;
|
with Ada.Containers.Vectors;
package body Moving is
use Ada.Containers;
package Number_Vectors is new Ada.Containers.Vectors
(Element_Type => Number,
Index_Type => Natural);
Current_List : Number_Vectors.Vector := Number_Vectors.Empty_Vector;
procedure Add_Number (N : Number) is
begin
... |
-- Ett givet huvudprogram för laboration 2.
-- Du skall inte ändra på den del som är given, endast lägga till.
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;
with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Funct... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Calendar;
with Slim.Messages.strm;
with Slim.Players.Displays;
package body Slim.Players.Common_Play_Visiters is
funct... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
generic
type Fixed_Point_Type is delta <>;
package Fmt.Generic_Ordinary_Fixed_Point_Argument is
function To_Argument (X : Fixed_Point_Type) return Argument_Type'Class
with Inline;
function "&" (Args : Arguments; X : Fixed_Point_Type) return Arguments
with Inline;
private
type Fixed_Point_Argu... |
-- This spec has been automatically generated from STM32L0x3.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.Flash is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Access control register
... |
-- { dg-do run }
procedure Prot_Def is
protected Prot is
procedure Inc;
function Get return Integer;
private
Data : Integer := 0;
end Prot;
protected body Prot is
procedure Inc is
begin
Data := Data + 1;
end Inc;
function Get return Integer is
begin... |
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
type Frequency is Integer
procedure One is
begin
ResultFrequency : Frequency := 0;
CurrentFrequency : Frequency := 0;
Pos : Postive_Count;
InputFile : File_Type;
FileName : String := "input.txt";
begin
Open(File => InputFile, Mode =>... |
with linear_Net;
with Neural.Set;
with Neural.Net;
with float_Math;
with lace.Environ;
with ada.calendar; use ada.calendar;
with ada.Strings.unbounded; use ada.Strings.unbounded;
with ada.Strings.fixed; use ada.Strings.fixed;
with ada.Text_IO; use ada.Text_IO;
with Ada.Exceptions; ... |
-- CA1022A6M.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.
-- Unlim... |
--//////////////////////////////////////////////////////////
-- 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... |
-----------------------------------------------------------------------
-- gen-commands -- Commands for dynamo
-- Copyright (C) 2011, 2012, 2017, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use t... |
-- package Gauss_Quadrature_61
--
-- Package provides a 61 pt. Gauss-Kronrod quadrature rule. Tables are
-- good to about 30 significant figures.
-- A 30-point Gaussian rule is used for error estimate.(From Quadpack.)
--
-- To estimate the idefinite integral of a function F(X) in an interval
-- (X_Starting, X_Final)... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
package body SPARKNaCl.Sign.Utils
with SPARK_Mode => On
is
procedure Construct (X : in Bytes_64;
Y : out Signing_SK)
is
begin
Y.F := X;
end Construct;
end SPARKNaCl.Sign.Utils;
|
with Ada.Integer_Text_IO; Use Ada.Integer_Text_IO;
with Ada.Float_Text_IO; Use Ada.Float_Text_IO;
with Ada.Text_IO; Use Ada.Text_IO;
with inventory_list; Use inventory_list;
with player; Use player;
with save_load_game; Use save_load_game;
Procedure save_test is
bob : Player_Type;
begin
clearCharacte... |
-- { dg-do run }
procedure Nan_Max is
function NaN return Long_Float is
Zero : Long_Float := 0.0;
begin
return Zero / Zero;
end;
Z : Long_Float := 1.0;
N : Long_Float := NaN;
begin
if Long_Float'Max (N, Z) /= Z then
raise Program_Error;
end if;
if Long_Float'Max (Z, N) /= ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
with Ada.Integer_Text_IO;
-- Copyright 2021 Melwyn Francis Carlo
procedure A028 is
use Ada.Integer_Text_IO;
N : constant Integer := 1001;
C : constant Integer := Integer (Float'Floor (Float (N) / 2.0)) + 1;
Spiral_Array : array (Integer range 1 .. N,
Integer range 1 .. N) of I... |
with Ada.Float_Text_IO, Ada.Integer_Text_IO, Ada.Text_IO;
with Integer_Exponentiation;
procedure Test_Integer_Exponentiation is
use Ada.Float_Text_IO, Ada.Integer_Text_IO, Ada.Text_IO;
use Integer_Exponentiation;
R : Float;
I : Integer;
begin
Exponentiate (Argument => 2.5, Exponent => 3, Result => R);
... |
with Ada.Real_Time; use Ada.Real_Time;
package body Servo is
-----------
-- Write --
-----------
procedure Write(High_Time : Integer; Pin_Id : Arduino.IOs.Pin_Id) is
TimeNow : Time;
begin
TimeNow := Ada.Real_Time.Clock;
Arduino.IOs.DigitalWrite (Pin_Id, True);
delay until Ti... |
package Animals is
type Animal is abstract tagged private;
function Legs
(A : Animal) return Natural;
function Wings
(A : Animal) return Natural;
procedure Add_Wings (A : in out Animal;
N : Positive);
procedure Add_Legs (A : in out Animal;
N : Positive);
private
... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017-2018, AdaCore --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- { dg-do compile }
with Text_IO; use Text_IO;
procedure Discr43 is
type Arr is array (Short_Integer range <>) of Boolean;
type Rec (LB : Short_Integer; UB : Short_Integer) is record
A : Arr (LB .. UB);
end record;
begin
Put_Line ("Arr'Max_Size =" & Arr'Max_Size_In_Storage_Elements'Img);
Put_Line ("... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.