content
stringlengths
23
1.05M
with Ada.Unchecked_Deallocation; -- Define the link type procedure Singly_Linked is type Link; type Link_Access is access Link; type Link is record Data : Integer; Next : Link_Access := null; end record; -- Instantiate the generic deallocator for the link type procedure Free is new Ada.Un...
package Problem_59 is -- Each character on a computer is assigned a unique code and the preferred -- standard is ASCII (American Standard Code for Information -- Interchange). For example, uppercase A = 65, asterisk (*) = 42, and -- lowercase k = 107. -- -- A modern encryption method is to take a ...
----------------------------------------------------------------------- -- awa-commands -- AWA commands for server or admin tool -- 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...
-- DECLS-DTNODE.ads -- Declaracions del node with Decls.Dgenerals, Decls.D_Taula_De_Noms, Decls.Dtdesc; use Decls.Dgenerals, Decls.D_Taula_De_Noms, Decls.Dtdesc; package Decls.Dtnode is --pragma pure; type Mmode is (Entra, Surt, Entrasurt); type Operacio is (Suma, Rest...
------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
-- -- Copyright 2021 (C) Holger Rodriguez -- -- SPDX-License-Identifier: BSD-3-Clause -- with Interfaces; private with Edc_Client.Matrix.Common; with Edc_Client.Matrix.Types; use Edc_Client.Matrix.Types; package body Edc_Client.Matrix.Double_Word is -------------------------------------------------------------...
------------------------------------------------------------------------------- -- Copyright (c) 2016 Daniel King -- -- Permission is hereby granted, free of charge, to any person obtaining a -- copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction...
generic type Float_Type is digits <>; package Fmt.Generic_Float_Argument is -- float to string -- https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf -- https://github.com/jk-jeon/dragonbox/blob/master/other_files/Dragonbox.pdf -- Edit format -- "w=" width -- "a=" width after deci...
with Ada.Containers.Generic_Array_Access_Types; with Ada.Unchecked_Deallocation; package body GNAT.Dynamic_Tables is procedure Free is new Ada.Unchecked_Deallocation (Table_Type, Table_Ptr); package Arrays is new Ada.Containers.Generic_Array_Access_Types ( Implementation.Index_Type, Tabl...
with Ada.Numerics.Generic_Complex_Types; with Ada.Numerics.Generic_Complex_Elementary_Functions; with Ada.Numerics.Generic_Elementary_Functions; with Ada.Text_IO.Complex_Io; with Ada.Text_Io; use Ada.Text_Io; procedure Factorial_Numeric_Approximation is type Real is digits 15; package Complex_Pck is new Ada.Nume...
with NSO.JSON.Gnoga_Object, NSO.JSON.Parameters_to_JSON, NSO.Types.Report_Objects.Observation_Report, NSO.Types.Report_Objects.Weather_Report, Ada.Strings.Unbounded, Gnoga.Types, Gnoga.Gui.View, Gnoga.Gui.Window, Gnoga.Gui.Element.Table; Function Report_Table ( Parent : in out Gnoga.Gui.View.View_Type; ...
with Ada.Text_IO; with OpenAL.Context.Error; with OpenAL.Error; with OpenAL.Context; with OpenAL.Global; with Test; procedure global_001 is package ALC renames OpenAL.Context; package ALC_Error renames OpenAL.Context.Error; package AL_Error renames OpenAL.Error; Device : ALC.Device_t; Context : ALC....
with Ada.Numerics.Elementary_Functions; with Ada.Calendar.Formatting; with Ada.Calendar.Time_Zones; with SDL.Video.Windows.Makers; with SDL.Video.Renderers.Makers; with SDL.Events.Events; procedure Draw_A_Clock is use Ada.Calendar; use Ada.Calendar.Formatting; Window : SDL.Video.Windows.Window; Renderer...
------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
-- 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-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...
with Ada.Integer_Text_IO, Ada.Text_IO; procedure Introspection is use Ada.Integer_Text_IO, Ada.Text_IO; begin Put ("Integer range: "); Put (Integer'First); Put (" .. "); Put (Integer'Last); New_Line; Put ("Float digits: "); Put (Float'Digits); New_Line; end Introspection;
generic N : in Natural; package DataOperations is subtype Index is Positive range 1 .. N; type Vector is array (Index) of Integer; type Matrix is array (Index) of Vector; procedure Input (a : out Integer); procedure Generate (a : out Integer); procedure FillWithOne (a : out Integer); proce...
package Test1 is Question: constant string := "How Many Characters?"; Ask_Twice: constant string := Question & Question; end Test1; with Test1; use Test1; package Test2 is Str: string(Ask_Twice'range) := Ask_Twice; end Test2;
with Ada.Text_IO; use Ada.Text_IO; procedure Test is A'B : integer; begin Put('a'); end;
limited with Actors, Engines; package Components.Destructibles is -- Base components type Destructible is abstract tagged record max_hp, hp : Health; defense_stat : Defense; end record; function is_dead(self : Destructible) return Boolean with Inline; function take_damage(self : in out Des...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with bits_types_h; package sys_types_h is -- Copyright (C) 1991-2021 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- The GNU C Library is free software; you can redistribute it and/or -- modify...
with VisitFailurePackage, VisitablePackage, EnvironmentPackage; use VisitFailurePackage, VisitablePackage, EnvironmentPackage; package body SequenceStrategy is ---------------------------------------------------------------------------- -- Object implementation -----------------------------------------------------...
----------------------------------------------------------------------- -- ado-queries -- Database Queries -- Copyright (C) 2011, 2012, 2013, 2014, 2015, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you...
-- Hardware contains the code to control the hardware platform. This -- top level package contains initialisation for the hardware before any -- of the specific modules are set up. package Hardware is -- Init is required for any of other hardware modules. procedure Init; end Hardware;
package body Separated is procedure Watch_Me is separate; function Look_Out return Float is (5.0); end Separated;
-- package Clenshaw -- -- Clenshaw's formula is used to evaluate functions Q_k (X), and -- summations over functions Q_k (X), where the functions Q_k (X) -- are defined by recurrance relations of the sort: -- -- Q_0 = some given function of X -- Q_1 = Alpha(1, X) * Q_0(X) -- Q_k = Alpha(k,...
----------------------------------------------------------------------- -- components-widgets-progress -- Simple progress bar -- Copyright (C) 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 this...
with Interfaces; use type Interfaces.Unsigned_32; package body Symbex.Parse is package body Internal is function Get_Data (Node : in Node_t) return UBW_Strings.Unbounded_Wide_String is begin case Node.Kind is when Node_Symbol => return Node.Name; when Node_String => return Node...
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ...
with Ada.Text_IO; with Interfaces; use Interfaces; with HAL; with Lv; use Lv; with Lv.Color; with Lv.Hal.Disp; use Lv.Hal.Disp; with Lv.Hal.Indev; use Lv.Hal.Indev; with Lv.Indev; with Lv.Objx; with Lv.Objx.Img; with Lv.Vdb; with BB_Pico_Bsp.LCD; with BB_Pico_Bsp.Keyboard; with BB_Pico_Bsp.Touch; with BBQ10K...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Containers.Doubly_Linked_Lists; procedure Pythagore_Set is type Triangles is array (1 .. 3) of Positive; package Triangle_Lists is new Ada.Containers.Doubly_Linked_Lists ( Triangles); use Triangle_Lists; function Find_List (Upper_Bound : Positive) return...
generic Size : Positive; type Item is private; package Ringbuffers is type Ringbuffer is tagged private; procedure Write (Self : in out Ringbuffer; e : Item); function Read (Self : in out Ringbuffer) return Item; function Is_Empty (Self : Ringbuffer) return Boolean; private type Item_Array is a...
with HAL; use HAL; with HiFive1.LEDs; use HiFive1.LEDs; with FE310; with FE310.CLINT; with FE310.Time; use FE310.Time; with Interfaces; use Interfaces; with IO; -- Create dependencies to force recompilation of the whole libraryw pragma Warnings (Off); with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Core; with S...
with ada.unchecked_Conversion; package openGL.Culler.frustum -- -- Provides a frustrum culler. -- is type Item is new Culler.Item with private; type View is access all Item'Class; --------- --- Forge -- procedure define (Self : in out Item); -------------- --- Attributes -- ove...
-- C74206A.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 (c) 2021 Devin Hill -- zlib License -- see LICENSE for details. with GBA.Interrupts; use GBA.Interrupts; with GBA.Numerics; use GBA.Numerics; with GBA.Memory; use GBA.Memory; with Interfaces; use Interfaces; with GBA.Display.Backgrounds; use GBA.Display.Backgrounds; with GBA.Display.Objects; us...
-------------------------- with Text_IO; with Formatter; procedure Formatter_Test is -- ++ -- -- FUNCTIONAL DESCRIPTION: -- -- This is a test driver program for the generic Formatter package. -- -- FORMAL PARAMETERS: -- -- None. -- -- DESIGN: -- -- This test driver contains a number of ...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
-- This file is generated by SWIG. Please do *not* modify by hand. -- with gmp_c.a_a_mpf_struct; with Interfaces.C; package gmp_c.mpf_srcptr is -- Item -- subtype Item is gmp_c.a_a_mpf_struct.Pointer; -- Items -- type Items is array (Interfaces.C.size_t range <>) of aliased gmp_c.mpf_srcptr.It...
with Ada.Strings.unbounded, Ada.Containers.vectors; package AdaM is -- Text -- subtype Text is ada.Strings.Unbounded.Unbounded_String; function "+" (the_Text : in Text) return String renames ada.Strings.Unbounded.To_String; function "+" (the_String : in String) return Text rena...
-- Abstract : -- -- See spec. -- -- Copyright (C) 2018 - 2019 Free Software Foundation, Inc. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2021 Zane Myers -- -- 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 witho...
with Ada.Text_IO; with Spatial_Data; use Spatial_Data; procedure Spatial1 is package TIO renames Ada.Text_IO; procedure print (shape : Geometry; label : String); procedure print (shape : Geometry; label : String) is begin TIO.Put_Line ("===== " & label & " ====="); TIO.Put_Line ("MySQL: " & m...
-- CD2A23A.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...
with Ada.Text_IO; use Ada.Text_IO; procedure Hello_world is begin Put_Line ("Hello World!"); end Hello_world;
with TH; with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; procedure TH_Sujet is package TH_str_int is new TH (Capacite => 11, T_Cle => Unbounded_String, T_Donnee => Integer, Hachage => Length); use TH_str_int...
package body Ada.Numerics.dSFMT.Generating is -- no SIMD version use type Interfaces.Unsigned_64; procedure do_recursion ( r : aliased out w128_t; a, b : aliased w128_t; lung : aliased in out w128_t) is t0, t1, L0, L1 : Unsigned_64; begin t0 := a (0); t1 := a (1); ...
with Ada.Exceptions; private with Ada.Finalization; -- Provides routines that prefix the output with the name of the current -- module. -- -- Note: -- If this is instantiated multiple times inside nested declarative regions -- (e.g. nested subprograms) and the resulting package is "use"d, then calls on -- Log, etc. in ...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Ada.Tags; use Ada.Tags; with Apsepp.Generic_Prot_Integer; private with Ada.Containers.Hashed_Maps, Apsepp.Containers, Apsepp.Tags; package Apsepp.Test_Node_Class ...
with Ada.Text_IO, Bonacci; procedure Test_Bonacci is procedure Print(Name: String; S: Bonacci.Sequence) is begin Ada.Text_IO.Put(Name & "("); for I in S'First .. S'Last-1 loop Ada.Text_IO.Put(Integer'Image(S(I)) & ","); end loop; Ada.Text_IO.Put_Line(Integer'Image(S(S'Last)) & "...
with Ada.Streams; package AdaM.a_Type.signed_integer_type is type Item is new a_Type.integer_Type with private; type View is access all Item'Class; -- Forge -- function new_Type (Name : in String := "") return signed_integer_type.view; overriding procedure destruct (Self : in out ...
with Ada.Text_IO; with Ada.Integer_Text_IO; with PrimeInstances; with Ada.Containers.Ordered_Sets; package body Problem_37 is package IO renames Ada.Text_IO; package I_IO renames Ada.Integer_Text_IO; package Integer_Primes renames PrimeInstances.Integer_Primes; package Integer_Set is new Ada.Containers.Ord...
pragma License (Unrestricted); package Ada.Characters.Latin_1 is pragma Pure; -- Control characters: NUL : constant Character := Character'Val (0); SOH : constant Character := Character'Val (1); STX : constant Character := Character'Val (2); ETX : constant Character := Character'Val (3); EOT : c...
-- -- 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...
-- CD4031A.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...
with Ada.Text_IO; use Ada.Text_IO; procedure Delegation is package Things is -- We need a common root for our stuff type Object is tagged null record; type Object_Ptr is access all Object'Class; -- Objects that have operation thing type Substantial is new Object with null record; ...
procedure Ada.Unchecked_Deallocate_Subpool ( Subpool : in out System.Storage_Pools.Subpools.Subpool_Handle) is pragma Suppress (All_Checks); begin System.Storage_Pools.Subpools.Unchecked_Deallocate_Subpool (Subpool); end Ada.Unchecked_Deallocate_Subpool;
with AUnit.Assertions; use AUnit.Assertions; package body Day.Test is procedure Test_Part1 (T : in out AUnit.Test_Cases.Test_Case'Class) is pragma Unreferenced (T); f : constant Ferry := load_file("test1.txt"); d : constant Natural := distance(f); begin Assert(d = 25, "Wrong number, expected 25, g...
------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
-- Copyright 2016-2019 NXP -- All rights reserved.SPDX-License-Identifier: BSD-3-Clause -- This spec has been automatically generated from LPC55S6x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NXP_SVD.FLEXCOMM is pragma Preelaborate...
------------------------------------------------------------------------------- -- Copyright (c) 2016 Daniel King -- -- Permission is hereby granted, free of charge, to any person obtaining a -- copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction...
with Protypo.Api.Engine_Values.Array_Wrappers; package Integer_Arrays is type Int_Array is array (Positive range <>) of Integer; package Wrappers is new Protypo.Api.Engine_Values.Array_Wrappers (Element_Type => Integer, Array_Type => Int_Array, Create => Protypo.Api.Engine_Va...
----------------------------------------------------------------------- -- openapi-credentials-oauth -- OAuth2 client credentials -- Copyright (C) 2018, 2022 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may no...
C:\Users\Noah Lie\OneDrive\Desktop\snek>"C:\Users\Noah Lie\OneDrive\Desktop\snek\bin\Debug\net5.0\snek" O hmmm.. Reading C:\Users\Noah Lie\SnekTheGam\Storage.json Window handle is invalid, cannot resume. Full message: System.IO.IOException: The handle is invalid. at System.ConsolePal.Clear() at System....
------------------------------------------------------------------------------ -- Copyright (c) 2013, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
-- remote_server.adb - Main package for use by NymphRPC clients. -- -- 2017/07/01, Maya Posch -- (c) Nyanko.ws package body NymphRemoteServer is function init(logger : in <?>, level : in integer, timeout: in integer) return Boolean is begin -- end init; end NymphRemoteServer;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
with Ada.Text_IO; use Ada.Text_IO; procedure Adventofcode.Day_10.Main is begin Put_Line ("Day-10"); end Adventofcode.Day_10.Main;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Scanned_Rule_Handlers; with Program.Scanner_States; with Program.Scanners; with Program.Scanner_Destinations; package Pr...
procedure Enum_Derived_Type is type Rainbow is (Red, Orange, Yellow, Green, Blue, Indigo, Violet); type ColdColors is new Rainbow range Blue .. Violet; BlueColor : ColdColors := Blue; begin null; end Enum_Derived_Type;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; use Program.Lexical_Elements; package Program.Symbols is pragma Pure; type Symbol is mod 2 ** 3...
-- ----------------------------------------------------------------- -- -- AdaSDL -- -- Thin binding to Simple Direct Media Layer -- -- Copyright (C) 2000-2012 A.M.F.Vargas -- -- Antonio M. M. ...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Ada.Exceptions; use Ada.Exceptions; with Ada.Tags; use Ada.Tags; limited with Apsepp.Test_Node_Class; package Apsepp.Test_Reporter_Class is type Test_Reporter_Interfa is limited interface; type...
package body Forward_AD.AD2D is function "+" (A, B : in AD2D) return AD2D is begin return (X => A.X + B.X, Y => A.Y + B.Y); end "+"; function "-" (A, B : in AD2D) return AD2D is begin return (X => A.X - B.X, Y => A.Y - B.Y); end "-"; function "*" (A : in AD2D; ...
----------------------------------------------------------------------- -- util-beans-objects-maps -- Object maps -- Copyright (C) 2010, 2011, 2012, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- yo...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
-- { dg-do compile } -- { dg-options "-gnatws" } package body array1 is subtype Small is Integer range 1 .. MAX; type LFT is record RIC_ID : RIC_TYPE; end record; LF : array (RIC_TYPE, Small) of LFT; procedure Foo (R : RIC_TYPE) is L : Small; T : LFT renames LF (R, L); begin S...
-- This spec has been automatically generated from msp430g2553.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; -- ADC10 package MSP430_SVD.ADC10 is pragma Preelaborate; --------------- -- Registers -- --------------- -- ADC10 Data Transfer C...
with vectores; use vectores; function esta_en_vector_ordenado (n: in Integer; V: in Vector_De_Enteros) return Boolean is -- pre: V contiene al menos un elemento (V'Last >= 1) -- V esta ordenado ascendentemente: -- V(i) <= V(i+1), 1 <= i < V'last -- post: el resultado es True si N est...
pragma License (Unrestricted); -- implementation unit specialized for FreeBSD (or Linux) with Ada.IO_Exceptions; with Ada.Streams; with C.iconv; package System.Native_Environment_Encoding is -- Platform-depended text encoding. pragma Preelaborate; use type C.char_array; -- max length of one multi-byte c...
with System.Address_To_Named_Access_Conversions; with System.Storage_Barriers; package body System.Atomic_Primitives is use type Interfaces.Unsigned_8; use type Interfaces.Unsigned_16; use type Interfaces.Unsigned_32; use type Interfaces.Unsigned_64; pragma Compile_Time_Warning ( not uint8'Atomic_...
with Giza.Widget.Tiles; use Giza.Widget; with Basic_Test_Window; use Basic_Test_Window; package Test_Tiles_Window is type Tiles_Window is new Test_Window with private; type Tiles_Window_Ref is access all Tiles_Window; overriding procedure On_Init (This : in out Tiles_Window); overriding procedure On...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2013 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...
with Unchecked_Deallocation; package body Stack_Pack is SCCS_ID : constant String := "@(#) stack.ada, Version 1.2"; type Node is record Datum : Element; Next : Link; end record; function Top_Value (S: in Stack) return Element is begin if S.Top...
with Ada.Text_Io, Ada.Integer_Text_IO; use Ada.Text_Io, Ada.Integer_Text_IO; procedure Diff_Ints is A, B, C : Integer; begin Put("A="); Get(A); Put("B="); Get(B); Put("C="); Get(C); if A = B and B = C and C = A then Put_Line("All the same"); elsif A = B or A = C or B = C then Put_Line("Two th...
-- $Id: parser.adb,v 1.15 2008/10/08 11:18:33 grosch Exp $ $@ with $, General, DynArray, Strings, # ifndef NO_RECOVER Sets, # endif # if ! defined NO_RECOVER | defined YYReParse Errors, # endif # ifndef YYDEBUG Position, # endif Text_Io; $@ package body @ is $G[ -- GLOBAL section is inserted here $@ type...
with Cards, Ada.Numerics.Discrete_Random; use Cards; package Deck is function Draw return Card; private type Index_Type is range 1 .. 52; package Random_Index is new Ada.Numerics.Discrete_Random(Index_Type); use Random_Index; Index_Generator : Random_Index.Generator; type Deck_Card is new Card with record ...
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Test_Literals is begin Put (16#2D7#); Put (10#727#); Put (8#1_327#); Put (2#10_1101_0111#); end Test_Literals;
-- { dg-do compile } package Volatile1 is C : Character; for C'Size use 32; pragma Volatile (C); type R1 is record C: Character; pragma Volatile (C); end record; for R1 use record C at 0 range 0 .. 31; end record; type R2 is record C: Character; pragma Volatile (C); end record;...
pragma License (Unrestricted); -- overridable runtime unit specialized for POSIX (Darwin, FreeBSD, or Linux) private with C.signal; package System.Unwind.Mapping is pragma Preelaborate; -- signal alt stack type Signal_Stack_Type is private; -- register signal handler (init.c/seh_init.c) procedure In...
------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
-- { dg-do compile } pragma Implicit_Packing; package Rep_Clause5 is type Modes_Type is (Mode_0, Mode_1); for Modes_Type'size use 8; type Mode_Record_Type is record Mode_1 : aliased Modes_Type; Mode_2 : aliased Modes_Type; Mode_3 : aliased Modes_Type; Mode_4 : ali...
-- C64105D.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...
separate (Exprs) procedure Store (The_Expr : Expr'Class; Result : out Expr_Handle; Success : out Boolean) is use Ada.Containers; use Storage; begin if Length (Container) >= Container.Capacity then Success := False; Result := 1; return; end if; Appen...
-- -- Copyright (C) 2013 Reto Buerki <reet@codelabs.ch> -- Copyright (C) 2013 Adrian-Ken Rueegsegger <ken@codelabs.ch> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- 1. Redistrib...
with Ada.Exception_Identification.From_Here; with System.Native_Calendar; with System.Native_Time; package body Ada.Calendar is use Exception_Identification.From_Here; use type System.Native_Time.Nanosecond_Number; function add_overflow ( a, b : System.Native_Time.Nanosecond_Number; res : not null...
with Ada.Integer_Text_IO; with Ada.Text_IO; with PrimeUtilities; package body Problem_21 is package IO renames Ada.Text_IO; package I_IO renames Ada.Integer_Text_IO; procedure Solve is subtype subset is Integer range 1 .. 10_000; package Subset_Primes is new PrimeUtilities(Num => subset); sie...