content stringlengths 23 1.05M |
|---|
with System.Address_To_Access_Conversions;
with System.Storage_Elements;
with C.errno;
with C.iconv;
with C.string;
with iconv.Inside;
package body iconv is
use type Ada.Streams.Stream_Element_Offset;
use type System.Address;
use type C.signed_int;
use type C.size_t;
package char_ptr_Conv is
new System.Address... |
with Worlds; use Worlds;
with Entities; use Entities;
with Materials; use Materials;
with Menus; use Menus;
with Vectors2D; use Vectors2D;
with Links; use Links;
package DemoLogic is
Hold : Natural := 0;
LastX, LastY : Integer := 0;
GlobalGravity : Vec2D := (0.0, 0.0);
MaxHold : constant Natural := 40;... |
with system.Storage_Elements;
package Counter
with SPARK_Mode => On
-- Small external state tutorial exercise
--
-- This package uses an external counter which is incremented
-- by one every time:
-- A. its clock ticks,
-- B. it is read.
--
-- It has one query procedure Bump_And_Monitor to check if the
-- counter ha... |
with Tarmi.Environments; use Tarmi.Environments;
package Tarmi.Evaluation is
function Eval (Form : Datum; Env : Environment) return Datum ;
end Tarmi.Evaluation;
|
--
-- Raytracer implementation in Ada
-- by John Perry (github: johnperry-math)
-- 2021
--
-- implementation for Colors, both RGB ("Color_Type")
-- and RGBA ("Transparent_Color_Type")
--
package body Colors is
function Create_Color(Red, Green, Blue: Float15) return Color_Type is
( Red => Red, Green => Gre... |
-- AOC, Day 6
with Ada.Text_IO; use Ada.Text_IO;
with Day; use Day;
procedure main is
ol : Orbit_List.Vector;
begin
ol := Day.load_orbits("input.txt");
put_line("Part 1: " & Orbit_Checksum'Image(Day.orbit_count_checksum(ol)));
-- put_line("Part 2: " & Day1.Mass'Image(Day1.total_fuel));
end main;
|
package RCP.Control is
protected Controller is
entry Demand
(Res : out Resource_T;
Req : Request_T);
procedure Release (Res : Resource_T);
function Query return Request_T;
private
-- we use a private typed channel
-- not visibile from the outside of this... |
------------------------------------------------------------------------------
-- --
-- JSON Parser/Constructor --
-- --
-- -... |
with bcm2835_h;
with Interfaces.C; use Interfaces.C;
package body Raspio is
procedure Initialize is
Error_Code : constant Interfaces.C.int := bcm2835_h.bcm2835_init;
begin
if Error_Code /= 1 then
raise Initialization_Error with "BCM2835 initialization failed";
end if;
end Initializ... |
-- { dg-do compile }
with Ada.Text_IO; use Ada.Text_IO;
procedure Rep_Clause1 is
type Int_16 is range 0 .. 65535;
for Int_16'Size use 16;
----------------------------------------------
type Rec_A is
record
Int_1 : Int_16;
Int_2 : Int_16;
Int_3 : Int_16;
... |
--------------------------------------------------------------------------------
-- Copyright (c) 2013, Felix Krause <contact@flyx.org>
--
-- 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 pe... |
with AAA.Strings;
with CLIC.Subcommand;
with CLIC.TTY;
package Commands.Topics.Issues is
package TT renames CLIC.TTY;
type Topic is new CLIC.Subcommand.Help_Topic with null record;
overriding
function Name (This : Topic) return CLIC.Subcommand.Identifier
is ("issues");
overriding
function Title ... |
with System.Machine_Code; use System.Machine_Code;
package body Atomic.Critical_Section is
-----------
-- Enter --
-----------
procedure Enter (State : out Interrupt_State) is
NL : constant String := ASCII.CR & ASCII.LF;
begin
System.Machine_Code.Asm
(Template =>
"dsb" &... |
-- This file is generated by SWIG. Do *not* modify by hand.
--
with Interfaces.C.Extensions;
package llvm is
-- LLVMCtxt
--
type LLVMCtxt is new Interfaces.C.Extensions.opaque_structure_def;
type LLVMCtxt_array is
array (Interfaces.C.size_t range <>) of aliased llvm.LLVMCtxt;
type LLVMCtxt_vie... |
-----------------------------------------------------------------------
-- keystore-files -- Ada keystore files
-- Copyright (C) 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 file ex... |
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Torrent.Contexts is
-----------------------
-- Add_Metainfo_File --
-----------------------
procedure Add_M... |
-----------------------------------------------------------------------
-- awa-blogs-tests -- Unit tests for blogs module
-- Copyright (C) 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 ma... |
package Invariant_Index is
Name_Buffer : String (1 .. 100);
Name_Len : Natural;
procedure Proc (S : String);
end Invariant_Index;
|
with Ada.Containers.Vectors;
with Items;
use Items;
package Gilded_Rose is
package Item_Vecs is new Ada.Containers.Vectors (
Element_Type => Item,
Index_Type => Positive
);
type Gilded_Rose is record
Items : Item_Vecs.Vector;
end record;
procedure Update_Quality(Self : in out Gilded_Rose);
end G... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
with Ada.Characters.Handling,
Ada.Strings.Fixed;
package body ARM_Format.Data is
--
-- Ada reference manual formatter (ARM_Form).
--
-- This package contains various data used by the input file parser.
--
-- ---------------------------------------
-- Copyright 2011, 2012 AXE... |
package body getter is
procedure push (getter : getter_type) is
begin
getters_stack.append(getter);
current_getter := getter;
end push;
procedure pop is
begin
getters_stack.delete_last;
if not getters_stack_t.is_empty(getters_stack) then
current_getter := getters_stack_t.last_element(ge... |
--
-- Provides the ability to create a configuration to be used when creating a
-- Kafka handle
--
package Kafka.Config is
--
-- Creates a new kafka config object
--
-- librdkafka equivalent: rd_kafka_conf_new
--
function Create return Config_Type
with Import => True,
Conve... |
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_pbutils_pbutils_enumtypes_h is
-- unsupported macro: GST_TYPE_INSTALL_PLUGINS_RETURN (gst_install_plugins_return_get_type())
-- unsupported mac... |
-----------------------------------------------------------------------
-- search-fields -- Document fields
-- Copyright (C) 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 in co... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/L... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
separate (Program.Scanners)
package body Tables is
type Second_Stage_Array is array (Second_Stage_Index) of Character_Class;
t... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions;
procedure Quadratic_Equation is
type Roots is array (1..2) of Float;
function Solve (A, B, C : Float) return Roots is
SD : constant Float := sqrt (B**2 - 4.0 * A * C);
... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with bits_types_h;
package bits_types_struct_timeval_h is
-- A time value that is accurate to the nearest
-- microsecond but also has a range of years.
-- Seconds.
type timeval is record
tv_sec : aliased bits_typ... |
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- ... |
package body impact.d2.Joint.gear
is
procedure dummy is begin null; end dummy;
-- #include <Box2D/Dynamics/Joints/b2GearJoint.h>
-- #include <Box2D/Dynamics/Joints/b2RevoluteJoint.h>
-- #include <Box2D/Dynamics/Joints/b2PrismaticJoint.h>
-- #include <Box2D/Dynamics/b2Body.h>
-- #include <Box2D/Dynamics/b2Time... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
package body agar.gui.widget.button is
package cbinds is
function allocate
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr) return button_access_t;
pragma import (c, allocate, "AG_ButtonNewS");
function allocate_function
(parent : widget_access_t;
... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
--
-- Copyright (C) 2022 Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Galois Linear Feedback Shift Register
-- https://en.wikipedia.org/wiki/Linear-feedback_shift_register#Galois_LFSRs
generic
type Random_Type is mod <>;
Taps : Random_Type;
package LFSR is
State : R... |
--
-- Jan & Uwe R. Zimmer, Australia, July 2011
--
with Real_Type; use Real_Type;
package Quaternions is
type Quaternion_Real is record
w, x, y, z : Real;
end record;
function "abs" (Quad : Quaternion_Real) return Real;
function Unit (Quad : Quaternion_Real) return Quaternion_Real;
function Co... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
--
-- Copyright 2021 (C) Jeremy Grosser
--
-- SPDX-License-Identifier: BSD-3-Clause
--
with Chests.Ring_Buffers;
with HAL.UART;
package Serial_Console is
type Port
(UART : not null HAL.UART.Any_UART_Port)
is tagged private;
procedure Put
(This : in out Port;
Item : Character);
proce... |
with GNAT.Spitbol; use GNAT.Spitbol;
with Ada.Strings.Unbounded;
with GNAT.Expect;
with GNATCOLL.Projects;
with GNATCOLL.Utils;
with GNAT.OS_Lib; use GNAT.OS_Lib;
use GNAT.Expect;
with Ada.Unchecked_Deallocation;
package body GPR_Tools.Gprslaves.DB is
use GNAT.Spitbol.Table_VString;
use type Ada.Strings.Unbounded... |
-----------------------------------------------------------------------
-- mat-readers-marshaller -- Marshalling of data in communication buffer
-- Copyright (C) 2014, 2015 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");... |
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- ... |
with
freetype.Face,
freeType_C.Binding;
package body freetype.charMap
is
use freeType_C;
-----------
-- Utility
--
function to_characterCode (From : in Character) return characterCode
is
begin
return Character'Pos (From) + 1;
end to_characterCode;
---------
-- Forge
... |
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package bits_types_u_sigset_t_h is
-- skipped anonymous struct anon_1
type uu_sigset_t_array937 is array (0 .. 15) of aliased unsigned_long;
type uu_sigset_t is record
uu_val : aliased uu_sigset_t_array937; -- /usr/inc... |
with Basic_Test_Window; use Basic_Test_Window;
with Giza.Context; use Giza.Context;
package Test_Images is
subtype Parent is Test_Window;
type Images_Window is new Parent with private;
type Images_Window_Ref is access all Images_Window;
overriding
procedure On_Displayed (This : in out Images_Window) i... |
package Discr31 is
type Byte_List_Type is array(Positive range <>) of Integer;
type Log_Item_Type(Last : Natural) is record
Data : Byte_List_Type(1 .. Last) := (others => 0);
Link : Natural := 0;
end record;
type Packet_Data_Type is access Log_Item_Type;
function Log_Item(Packet : in Pack... |
-- 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... |
-- { dg-do compile }
with deref2;
procedure deref3 is
Obj : aliased deref2.NT;
begin
deref2.PT_View (Obj'Access).Op;
Obj.PT_View.all.Op;
Obj.PT_View.Op;
end;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017, AdaCore --
-- --
-- ... |
package body Protected_Body_Declaration is
protected body T is
function func return Integer is
begin
return 0;
end func;
end T;
end Protected_Body_Declaration;
|
with Ada.Finalization;
with kv.avm.Registers;
with kv.avm.Control;
package kv.avm.Capabilities is
type Capability_Interface is interface;
type Capability_Access is access all Capability_Interface'CLASS;
procedure Execute
(Self : in out Capability_Interface;
Machine : in out kv.avm.Control.C... |
-- $Id: StringM.mi,v 1.5 1993/08/18 15:06:51 grosch rel $
-- $Log: StringM.mi,v $
-- Ich, Doktor Josef Grosch, Informatiker, Sept. 1994
with DynArray, Strings, Text_Io;
use Strings, Text_Io;
package body StringM is
package Int_Io is new Integer_IO (Integer); use Int_Io;
package Char_DA is new DynArray (Characte... |
with Ada.Text_IO, Ada.Numerics.Generic_Elementary_Functions;
procedure Mean_Angles is
type X_Real is digits 4; -- or more digits for improved precision
subtype Real is X_Real range 0.0 .. 360.0; -- the range of interest
type Angles is array(Positive range <>) of Real;
procedure Put(R: Real) is
... |
-----------------------------------------------------------------------
-- babel-files-maps -- Hash maps for files and directories
-- 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... |
with
gel.Keyboard,
lace.Event,
lace.Subject;
package gel.Mouse with remote_Types
--
-- Provides an interface to a mouse.
--
is
type Item is limited interface
and lace.Subject.item;
type View is access all Item'class;
----------
--- Events
--
type Button_Id is range 1... |
-- 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 Goals.Test_Data.Tests is
type Test is new GNATtest_Generated.GNATtest_Standard.Goals.Test_Data
.Test with
null re... |
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
private with Glfw.Enums;
package Glfw.Events.Joysticks is
use type Interfaces.C.C_float;
-- GLFW supports up to 16 joysticks; they are indexed from 1 to 16.
type Joystick_Index is range 1 .. ... |
------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- ... |
pragma License (Unrestricted);
-- with System;
-- with Ada.Task_Identification; -- See C.7.1
package Ada.Dynamic_Priorities is
pragma Preelaborate;
-- procedure Set_Priority (
-- Priority : System.Any_Priority;
-- T : Task_Identification.Task_Id := Task_Identification.Current_Task);
-- function Get_Prior... |
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Containers.Hashed_Maps;
with Program.Elements;
with Program.Element_Vectors;
with Lace.Element_Flat_Kinds;
generic
type Property_Name is (<>);... |
pragma Ada_2012;
with Ada.Command_Line;
with System.Address_To_Access_Conversions;
with Interfaces.C.Strings;
with Pulse_Def_H, Pulse_Sample_H;
use Ada;
package body Pulsada.Thin is
----------
-- Open --
----------
procedure Open
(Session : in out Session_Type;
Rate ... |
package body afrl.cmasi.keepInZone is
function getFullLmcpTypeName(this : KeepInZone) return String is ("afrl.cmasi.keepInZone.KeepInZone");
function getLmcpTypeName(this : KeepInZone) return String is ("KeepInZone");
function getLmcpType (this : KeepInZone) return UInt32_t is (CmasiEnum'Pos(KEEPINZONE_ENUM... |
-----------------------------------------------------------------------
-- ado-c -- Support for driver implementation
-- 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");
-- you may no... |
--
-- Jan & Uwe R. Zimmer, Australia, July 2011
--
with Ada.Task_Identification; use Ada.Task_Identification;
with Ada.Text_IO; use Ada.Text_IO;
package body Exceptions is
procedure Show_Exception (Exception_Identifier : Exception_Occurrence;
Optional_Message : String :... |
-- Copyright 2009, 2011 Free Software Foundation, Inc.
--
-- 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 version.
--
--... |
-- This spec has been automatically generated from STM32L4x6.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.OPAMP is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype OPAMP1_CSR_OPAMODE_F... |
package body Set_Of_Names is
use type Ada.Containers.Count_Type, Vecs.Cursor;
function Start(Names: Set) return Index_Type is
begin
if Names.Length = 0 then
return 1;
else
return Names.First_Index;
end if;
end Start;
function Stop(Names: Set) return Index_Type_With_... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- { dg-do run }
with Ada.Unchecked_Conversion;
with Ada.Streams; use Ada.Streams;
with Ada.Text_IO; use Ada.Text_IO;
procedure Unchecked_Convert2 is
subtype Day_Number is Integer range 0 .. 31;
subtype Byte_Array_Of_Integer is Stream_Element_Array
(1 .. Integer'Size / Stream_Element_Array'Component_Size... |
with
openGL.Primitive.indexed;
package body openGL.Model.line.colored
is
---------
--- Forge
--
function to_line_Model (Color : in openGL.Color;
End_1,
End_2 : in Vector_3 := Origin_3D) return Item
is
Self : Item;
begin
Self.Col... |
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- awa-images-beans -- Image Ada Beans
-- Copyright (C) 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 this file except in... |
with Ada.Text_IO; use Ada.Text_IO;
with System.Storage_Elements; use System.Storage_Elements;
with BBqueue;
with BBqueue.Buffers.framed;
with System; use System;
procedure Main_Framed
with SPARK_Mode
is
use type BBqueue.Result_Kind;
Q : aliased BBqueue.Buffers.framed.Framed_Buffer (60);
procedure Fill_With... |
with Ada.Characters.Latin_1;
with Ada.Text_IO;
package body AOC.AOC_2019.Day08 is
Width : Natural := 25;
Height : Natural := 6;
Image_Size : Natural := Width * Height;
type Pixel is new Character range '0' .. '2';
type Layer is array (0 .. Image_Size-1) of Pixel;
Checksum : Natural;
Result... |
generic
Max_Elements : Positive;
type Number is digits <>;
package Moving is
procedure Add_Number (N : Number);
function Moving_Average (N : Number) return Number;
function Get_Average return Number;
end Moving;
|
with Ada.Exceptions;
with Ada.Wide_Text_IO;
use Ada.Wide_Text_IO;
with Ada.Characters.Handling;
use Ada.Characters.Handling;
with Ada.Command_Line;
with Ada.Directories;
with Asis;
with Asis.Ada_Environments;
with Asis.Implementation;
with Asis.Exceptions;
with Asis.Errors;
with Context_Processing;
procedure PP_Ada_... |
-- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
with Ada.Finalization;
with Ada.Unchecked_Deallocation;
with AUnit.Assertions; use AUnit.Assertions;
package body Yaml.Lexer.Tokenization_Test is
use type Text.Reference;
subtype Evaluated_Tok... |
-- { dg-do run }
with GNAT.Compiler_Version;
procedure Test_Version is
package Vsn is new GNAT.Compiler_Version;
use Vsn;
X : constant String := Version;
begin
if X'Length = 78 then
-- 78 = Ver_Len_Max + Ver_Prefix'Length
-- actual version should be shorter than this
raise Program_Error;
... |
with Ada.Text_IO;
procedure Hello is
package IO renames Ada.Text_IO;
X: Integer := 4;
begin
case X is
when 1 =>
Walk_The_Dog;
when 5 =>
Launch_Nuke;
when 8 | 10 =>
Sell_All_Stock;
when others =>
Self_Destruct;
end case;
end Hello;
|
package Vect16 is
type Sarray is array (1 .. 4) of Long_Float;
for Sarray'Alignment use 16;
procedure Add_Sub (X, Y : Sarray; R,S : out Sarray);
end Vect16;
|
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, Maxim Reznik
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistr... |
pragma License (Unrestricted);
package Ada.Decimal is
pragma Pure;
Max_Scale : constant := +18; -- implementation-defined
Min_Scale : constant := -18; -- implementation-defined
Min_Delta : constant := 10.0 ** (-Max_Scale);
Max_Delta : constant := 10.0 ** (-Min_Scale);
Max_Decimal_Digits : constant ... |
-- -*- Mode: Ada -*-
-- Filename : last_chance_handler.adb
-- Description : Implementation of the exception handler for the kernel.
-- Author : Luke A. Guest
-- Created On : Thu Jun 14 12:06:48 2012
-- Licence : See LICENCE in the root directory.
-- wi... |
-----------------------------------------------------------------------
-- Memory clients - Client info related to its memory
-- Copyright (C) 2014, 2015, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may ... |
pragma License (Unrestricted);
private with System.Native_Real_Time;
package Ada.Real_Time is
type Time is private;
Time_First : constant Time;
Time_Last : constant Time;
Time_Unit : constant :=
Duration'Delta; -- implementation-defined-real-number
type Time_Span is private;
Time_Span_First : ... |
with Ada.Text_Io;
package body Widgets is
procedure Paint_Event (This : in out Widget'Class) is
begin
Ada.Text_Io.Put_Line ("Widgets.Paint_Event() called");
Ada.Text_Io.Put_Line (" Object_Name = """ & This.Get_Name & """");
end;
end Widgets;
|
with Ada.Strings.Fixed;
with Ada.Integer_Text_IO;
-- Copyright 2021 Melwyn Francis Carlo
procedure A030 is
use Ada.Strings.Fixed;
use Ada.Integer_Text_IO;
Sum : Integer := 0;
Sum_Of_Powers : Integer := 0;
Num_len : Integer;
begin
for I in 2 .. 1_000_000 loop
Sum_Of_Power... |
-----------------------------------------------------------------------
-- akt-windows -- GtK Windows for Ada Keystore GTK application
-- 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... |
-----------------------------------------------------------------------
-- awa-votes-modules -- Module votes
-- Copyright (C) 2013, 2014, 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... |
with League.Application;
with XML.SAX.Input_Sources.Streams.Files;
with XML.SAX.Simple_Readers;
with Handlers;
procedure Main is
Handler : aliased Handlers.Handler;
Input : aliased XML.SAX.Input_Sources.Streams.Files.File_Input_Source;
Reader : aliased XML.SAX.Simple_Readers.SAX_Simple_Reader;
begin
I... |
with Ada.Text_IO;
use Ada.Text_IO;
procedure testcase (i: Natural) is
begin
case i is
when 0 => Ada.Text_IO.Put ("zero");
when 1 => Ada.Text_IO.Put ("one");
when 2 => Ada.Text_IO.Put ("two");
-- case statements have to cover all possible cases:
when others => Ada.Text_IO.Put ("none of the above");
end case;
... |
PROCEDURE ExHandler IS
BEGIN
BEGIN
null;
EXCEPTION
WHEN OTHERS =>
NULL;
END;
NULL;
END ExHandler;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the... |
with Ada.Text_IO;
procedure Strip_Characters_From_String is
function Strip(The_String: String; The_Characters: String)
return String is
Keep: array (Character) of Boolean := (others => True);
Result: String(The_String'Range);
Last: Natural := Result'First-1;
begin
f... |
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Interfaces;
function TOML.Generic_Parse
(Stream : in out Input_Stream) return TOML.Read_Result
is
----------------------------
-- Lexical analysis state --
----------------------------
WW_Backspace : constant Wide_Wide_Character :=
... |
with Text_IO;
procedure No_To_WAR is
begin
Text_IO.Put_line("No to war!");
end No_To_WAR;
|
-- PACKAGE Fourier8
--
-- Standard Radix 8 (decimation in frequency) Cooley-Tukey FFT.
-- Procedure FFT does a Discrete Fourier Transform on data sets
-- that are powers-of-2 in length. The package is pure.
--
-- Radix 2 FFT's read and write the entire data set to the data array
-- log(N) times per transform (where N ... |
with
Interfaces.C.Strings,
System;
use type
System.Address;
package body FLTK.Widgets.Inputs.Secret is
procedure secret_input_set_draw_hook
(W, D : in System.Address);
pragma Import (C, secret_input_set_draw_hook, "secret_input_set_draw_hook");
pragma Inline (secret_input_set... |
-- This spec has been automatically generated from nrf53.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF53_SVD.GPIO_P0 is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- If pin satisfied sense cri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.