content
stringlengths
23
1.05M
generic type T is mod <>; package Offmt_Lib.Fmt_Data.Unsigned_Generic is subtype Parent is Fmt_Data.Instance; type Instance is new Parent with private; overriding procedure From_Frame (This : in out Instance; Frame : in out Data_Frame); overriding function Format (T...
-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaRe...
package body agar.gui.widget.notebook is package cbinds is procedure set_padding (notebook : notebook_access_t; padding : c.int); pragma import (c, set_padding, "AG_NotebookSetPadding"); procedure set_spacing (notebook : notebook_access_t; spacing : c.int); pragma import...
with Screen_Interface; use Screen_Interface; with Giza.Events; use Giza.Events; with Giza.GUI; use Giza.GUI; package body Utils is task body Touch_Screen is TS, Prev : Touch_State; Evt : constant Click_Event_Ref := new Click_Event; Released_Evt : constant Click_Released_Event_Ref := new Cl...
------------------------------------------------------------------------------ -- -- -- WAVEFILES -- -- -- -- ...
-- { dg-do run } with Ada.Streams.Stream_IO; procedure In_Out_Parameter is use Ada.Streams; use Stream_IO; File : Stream_IO.File_Type; type Bitmap is array (Natural range <>) of Boolean; for Bitmap'Component_Size use 1; type Message is record B : Bitmap (0 .. 14); end record; for Mes...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- ...
----------------------------------------------------------------------- -- Atlas.Applications.Models -- Atlas.Applications.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: ...
-- { dg-do run } with Generic_Disp_Pkg; use Generic_Disp_Pkg; procedure Generic_Disp is I : aliased Integer := 0; D : Iface'Class := Dispatching_Constructor (DT'Tag, I'access); begin null; end Generic_Disp;
with Ada.Real_Time; with ACO.Drivers.Socket; with ACO.CANopen; with ACO.Nodes.Locals; with ACO.Nodes.Remotes; with ACO.OD.Example; with ACO.Log; with Ada.Text_IO.Text_Streams; with Ada.Text_IO; with Ada.Exceptions; with ACO.OD_Types; with ACO.OD_Types.Entries; with ACO.SDO_Sessions; package body App is O : alias...
with Ada.Exception_Identification.From_Here; with System.Zero_Terminated_WStrings; with C.winnt; package body System.Native_Directories.Temporary is use Ada.Exception_Identification.From_Here; use type C.size_t; use type C.windef.UINT; use type C.windef.WINBOOL; TMP : aliased constant C.winnt.WCHAR_arra...
with Ada.Text_IO; package body Test_Annotation.Append is File_Name : constant String := "tmp/test-append-annotation.sf"; procedure Initialize (T : in out Test) is begin Set_Name (T, "Test_Annotation.Append"); Ahven.Framework.Add_Test_Routine (T, Append_Test_1'Access, "append test 1"); Ahve...
with Lv.Style; package Lv.Objx.Bar is subtype Instance is Obj_T; type Style_T is (Style_Bg, Style_Indic); -- Create a bar objects -- @param par pointer to an object, it will be the parent of the new bar -- @param copy pointer to a bar object, if not NULL then the new object will be copied from it ...
with agar.core.event; with agar.core.limits; with agar.core.tail_queue; with agar.gui.widget.button; with agar.gui.widget.combo; with agar.gui.widget.label; with agar.gui.widget.pane; with agar.gui.widget.textbox; with agar.gui.widget.tlist; package agar.gui.widget.file_dialog is use type c.unsigned; type option...
------------------------------------------------------------------------------ -- -- -- Hardware Abstraction Layer for STM32 Targets -- -- -- -- ...
package Radar_Internals is procedure Time_Step (Radar_Angle : Float; Time_To_Arrival : Float; John_Connor_Status : String); end Radar_Internals;
package body Moving_Thing is procedure Faster (T : in out Thing; D : in Direction; M : in Float) is begin null; -- null statement end Faster; procedure Stop (T : in out Thing) is begin T.Spd.Vx := 0.0; T.Spd.Vy := 0.0; T.Spd.Vz :...
------------------------------------------------------------------------------ -- 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...
-- { dg-do run } -- { dg-options "-O2" } with Ada.Text_Io; use Ada.Text_IO; with Raise_From_Pure; use Raise_From_Pure; procedure handle_raise_from_pure is K : Integer; begin K := Raise_CE_If_0 (0); exception when others => Put_Line ("exception caught"); end;
-- StrongEd$WrapWidth=256 -- StrongEd$Mode=Ada -- with Main; procedure Ext2Dir is begin Main.Main; end Ext2Dir;
-- see OpenUxAS\src\Includes\Constants\UxAS_String.h package UxAS.Common.String_Constant.Content_Type is Json : constant String := "json"; Lmcp : constant String := "lmcp"; Text : constant String := "text"; Xml : constant String := "xml"; end UxAS.Common.String_Constant.Content_Type;
package Pieces is pragma Pure; type Owner_Type is (Player_1, Player_2, None) with Size=>2; type Moved_Signal is (No, Yes) with Size=>2; type Piece_Name is (Pawn, Knight, Bishop, Rook, Queen, King, Empty) with Size=>4; type Piece_Type is record Name : Piece_Name; Owner : Owner_Type; Has_Moved : Moved_Signal...
----------------------------------------------------------------------- -- security-oauth -- OAuth Security -- Copyright (C) 2017, 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 except...
with AAA.Strings; with CLIC.Subcommand; package CLIC_Ex.Commands.Subsub is type Instance is new CLIC.Subcommand.Command with private; overriding function Name (Cmd : Instance) return CLIC.Subcommand.Identifier is ("subsub"); overriding function Switch_Parsing (This : Instance) ...
with Ada.Formatting; procedure format is begin Integer : declare type T is range -999 .. 999; function Image is new Ada.Formatting.Integer_Image (T); function Trimed_Image is new Ada.Formatting.Integer_Image ( T, Signs => Ada.Formatting.Triming_Sign_Marks); function Hex_Image is new Ada.Formatting.Intege...
with Ada.Assertions; use Ada.Assertions; with Ada.Containers.Ordered_Maps; use Ada.Containers; with Ada.Text_IO; use Ada.Text_IO; with Input; use Input; procedure Day04 is type Hour is array (Natural range 0 .. 59) of Natural; package Time_Maps is new Ordered_...
with Ada.Text_IO; use Ada.Text_IO; with System.Storage_Elements; use System.Storage_Elements; with COBS.Stream.Encoder; with Interfaces; use Interfaces; package body Offmt is type COBS_Encoder is new COBS.Stream.Encoder.Instance with null record; overriding procedure Flush (This : in out COBS_Encoder; ...
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ...
-- { dg-do compile } package Attribute_Parsing is I : constant Integer := 12345; S : constant String := I'Img (1 .. 2); end Attribute_Parsing;
----------------------------------------------------------------------- -- city_mapping -- Example of serialization mapping for city CSV records -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- y...
with Ada.Text_Io; use Ada.Text_Io; with Numeric_Tests; use Numeric_Tests; procedure Is_Numeric_Test is S1 : String := "152"; S2 : String := "-3.1415926"; S3 : String := "Foo123"; begin Put_Line(S1 & " results in " & Boolean'Image(Is_Numeric(S1))); Put_Line(S2 & " results in " & Boolean'Image(Is_Numeric(...
-- { dg-do compile } -- { dg-options "-gnatws" } -- (bits of "Header" unused) procedure Nested_Agg_Bitfield_Constructor is type Uint64 is mod 2 ** 64; type Uint16 is mod 2 ** 16; type Time_Stamp is record Sec : Uint64; Year : Uint16; end record; type Msg_Header is rec...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_Io; procedure Compare_Ints is A, B : Integer; begin Get(Item => A); Get(Item => B); -- Test for equality if A = B then Put_Line("A equals B"); end if; -- Test For Less Than if A < B then Put_Line("A ...
pragma License (Unrestricted); -- extended unit with Ada.Streams; private with Ada.Containers.Weak_Access_Holders; private with Ada.Finalization; private with System.Reference_Counting; generic type Name is private; -- it must have default value with procedure Free (X : in out Name) is <>; package Ada.Containers...
with Big_Integers; use Big_Integers; with Types ; use Types; package Construct_Conversion_Array with SPARK_Mode, Ghost is function Property (Conversion_Array : Conversion_Array_Type; J, K : Index_Type) return Boolean is (if J mod 2 = 1 and then K mod 2 = 1 then C...
with Pack13_Pkg; package Pack13 is package Four_Bits is new Pack13_Pkg (4); package Thirty_Two_Bits is new Pack13_Pkg (32); type Object is private; type Object_Ptr is access all Object; procedure Set (Myself : Object_Ptr; The_Data : Thirty_Two_Bits.Object); private type Some_Record is record Data_...
-- part of AdaYaml, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "copying.txt" with Ada.Text_IO; with Ada.Command_Line; with Yaml.Source.Text_IO; with Yaml.Source.File; with Yaml.Stream_Concept; with Yaml.Parser.Stream; with Yaml.Presenter; with Yaml.Destination.Text_IO; with Y...
-- Generated by utildgen.c from system includes with Interfaces.C; package Util.Systems.Constants is pragma Pure; -- Flags used when opening a file with open/creat. O_RDONLY : constant Interfaces.C.int := 8#000000#; O_WRONLY : constant Interfaces.C.int := 8#0000...
with Ada.Text_Io; use Ada.Text_Io; package body Example1 is procedure Sense is begin Dummy := 0; Count := Count + 1; Put_Line ("Sense Start"); Put_Line (Integer'Image(Count mod 2)); if Count mod 2 = 0 then for I in Integer range 1 .. 10000000 loop Dummy := Dummy + 1; end loop; for I ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
package body Bit_Streams is procedure Finalize (Stream : in out Bit_Stream) is begin if Stream.Write_Count > 0 then Stream.Output (1) := Stream.Output (1) * 2**(Stream_Element'Size - Stream.Write_Count); Stream.Channel.Write (Stream.Output); end if; end Finalize; procedure Read...
----------------------------------------------------------------------- -- druss-gateways -- Gateway management -- Copyright (C) 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 this file ex...
with Ada.Text_IO, POSIX.IO, POSIX.Memory_Mapping, System.Storage_Elements; procedure Read_Entire_File is use POSIX, POSIX.IO, POSIX.Memory_Mapping; use System.Storage_Elements; Text_File : File_Descriptor; Text_Size : System.Storage_Elements.Storage_Offset; Text_Address : System.A...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with GL.API; package body GL.Toggles is procedure Enable (Subject : Toggle) is begin API.Enable (Subject); Raise_Exception_On_OpenGL_Error; end Enable; procedure Disable (Subje...
with agar.core.error; package body agar.gui is use type c.int; package cbinds is function init (flags : agar.core.init_flags_t := 0) return c.int; pragma import (c, init, "AG_InitGUI"); function init_video (width : c.int; height : c.int; bpp : c.int; flags : video_fla...
----------------------------------------------------------------------- -- util-nullables -- Basic types that can hold a null value -- 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 us...
------------------------------------------------------------------------------ -- Copyright (c) 2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
with Ada.Text_IO; use Ada.Text_IO; package body EU_Projects.Node_Tables is procedure Dump (T : Node_Table) is use Node_Maps; begin for Pos in T.Table.Iterate loop Put_Line (EU_Projects.Nodes.To_String(Key (Pos)) & ":"); end loop; end Dump; ------------ -- Insert -- -------...
pragma License (Unrestricted); with Ada.Numerics.Generic_Complex_Types; with Ada.Text_IO.Complex_IO; generic with package Complex_Types is new Numerics.Generic_Complex_Types (<>); package Ada.Wide_Wide_Text_IO.Complex_IO is -- use Complex_Types; -- for renaming package Strings is new Text_IO.Complex_IO (Com...
With Gnat.IO; use Gnat.IO; procedure ej2 is type Peras is new Integer; type Naranjas is new Integer; P : Peras; N : Naranjas; S : Integer; begin Put ("Ingrese primer operando entero: "); Get (Integer(N)); New_Line; Put ("Ingrese segundo operando entero: "); Get (Integer(P));...
------------------------------------------------------------------------------ -- -- -- Ada binding for OpenGL/WebGL -- -- -- -- ...
with -<full_parent_datatype_package>-; use -<full_parent_datatype_package>-; with -<full_series_name_dots>-.enumerations; use -<full_series_name_dots>-.enumerations; with avtas.lmcp.byteBuffers; use avtas.lmcp.byteBuffers; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Streams; with Ada.Containers.Inde...
package gel.human_Types -- -- Provides core types for defining a Human. -- is pragma Pure; type controller_joint_Id is (MasterFloor, Root, Hips, UpLeg_L, LoLeg_L, Foot_L, Toe_L, UpLeg...
with ObjectPack, AbstractStrategyCombinatorPackage, IntrospectorPackage, StrategyPackage; use ObjectPack, AbstractStrategyCombinatorPackage, IntrospectorPackage, StrategyPackage; package ChoiceIdStrategy is FIRST : constant Integer := 0; SECOND : constant Integer := 1; type ChoiceId is new AbstractStrategyCombi...
with Ada.Strings.Unbounded; with Ada.Tags.Delegating; procedure delegate is package I is type Intf is limited interface; procedure Method (Object : Intf) is abstract; end I; package A is type Aggregated_Object (Message : access String) is new I.Intf with null record; procedure Dummy (Object : Aggregated_Obje...
with Ada.Text_IO; use Ada.Text_IO; with Libadalang.Analysis; use Libadalang.Analysis; with Libadalang.Common; use Libadalang.Common; with Rejuvenation.Simple_Factory; use Rejuvenation.Simple_Factory; package body Examples.Visitor is procedure Demo_Visitor (Unit : Analysis_Unit); ...
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Ada.Calendar; with Ada.Containers.Hashed_Sets; with Ada.Containers.Ordered_Sets; with Ada.Containers.Vectors; with Ada.Exceptions...
with Atomic.Critical_Section; use Atomic.Critical_Section; with System; package body Atomic is ---------- -- Init -- ---------- function Init (Val : Boolean) return Flag is Ret : aliased Flag := 0; Unused : Boolean; begin if Val then Test_And_Set (Ret, Unused); else ...
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 euler17 is type stringptr is access all char_array; procedure PString(s : stringptr) is begin String'Write (Text_Streams.S...
-- SipHash -- an Ada implementation of the algorithm described in -- "SipHash: a fast short-input PRF" -- by Jean-Philippe Aumasson and Daniel J. Bernstein -- Copyright (c) 2015, James Humphry - see LICENSE file for details with System; package body SipHash with SPARK_Mode, Refined_State => (Initial_Hash_State => In...
with Generator.Match_Pattern_Specific; procedure Main_Generator is begin Generator.Match_Pattern_Specific.Main; end Main_Generator;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- ...
with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Strings; with Ada.Strings.Maps; with Ada.Strings.Fixed; with Ada.Wide_Text_IO; use Ada.Wide_Text_IO; with Ada.Calendar; with Ada.Calendar.Formatting; with Ada.IO_Exceptions; with Asis.Compilation_Units; with Asis.Elements; with Asis.Text; with Asis.Ex...
----------------------------------------------------------------------- -- mat-commands -- Command support and execution -- Copyright (C) 2014, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use thi...
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- ...
-- -- Raytracer implementation in Ada -- by John Perry (github: johnperry-math) -- 2021 -- -- specification for types, constants, and operators used throughout -- -- Ada packages with Interfaces; -- @summary types, constants, and operators used throughout the project -- @description -- Makes precise the meaning of f...
------------------------------------------------------------------------------ -- Copyright (c) 2015-2019, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
------------------------------------------------------------------------------ -- Copyright (c) 2014-2017, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Complex_Text_IO; use Ada.Complex_Text_IO; with Ada.Numerics.Complex_Types; use Ada.Numerics.Complex_Types; with Ada.Numerics.Real_Arrays; use Ada.Numerics.Real_Arrays; with Ada.Numerics.Complex_Arrays; use Ada.Numerics.Complex_Arrays; with Ada...
-- AOC 2020, Day 10 with Ada.Containers.Vectors; package Day is package Adaptors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Natural); use Adaptors; function load_file(filename : in String) return Adaptors.Vector; function mult_1_3_differences(v : in Adaptors.Vector) r...
with Ada.Integer_Text_IO; -- Copyright 2021 Melwyn Francis Carlo procedure A023 is use Ada.Integer_Text_IO; Abundant_Numbers : array (Integer range 1 .. 10000) of Integer := (others => 0); N : Integer := 1; Count_Val : Integer := 1; J_Max, K, Count_By_2, Proper_Diviso...
with STM32.SPI; use STM32.SPI; with HAL.SPI; use HAL.SPI; package body Board is procedure Initialize is Pins : GPIO_Points := (LCD_RST, LCD_DC, LCD_CS); begin Enable_Clock (LCD_DIN & LCD_CLK); Enable_Clock (Pins); Set (Pins); Configure_IO (Pins, (Resistors => Pu...
-------------------------------------------------------------------------------- -- -- -- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. -- -- ...
with Types; use Types; package Gfx is procedure Init_Draw; procedure Draw_Keyboard(Mem : Memory); procedure Draw_Key(Mem : Memory; X : Integer; Y : Integer); procedure Draw_Key_Pixel(X : Integer; Y : Integer); procedure Draw_Pixel(X : Integer; Y : Integer; Pixel : Boolean); procedure Clear_Layer(...
package body STM32.CORDIC is ------------------------- -- Set_CORDIC_Function -- ------------------------- procedure Set_CORDIC_Function (This : in out CORDIC_Coprocessor; Value : CORDIC_Function) is begin This.CSR.FUNC := Value'Enum_Rep; end Set_CORDIC_Function; ----------...
-- The Village of Vampire by YT, このソースコードはNYSLです with Ada.Calendar; with Ada.Streams; with Ada.Strings.Unbounded; with Web.HTML; with Tabula.Casts; with Tabula.Villages; package Vampire.Forms is type Base_Page is (Index_Page, User_Page, User_List_Page, Village_Page); type Template_Set_Type is (For_Full, For_Mobil...
----------------------------------------------------------------------- -- servlet-filters -- Servlet Filters -- Copyright (C) 2010, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file exce...
-- pragma Locking_Policy (Ceiling_Locking); with Ada.Text_IO; with Ada.Real_Time; use Ada.Real_Time; with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; with Epoch_Support; use Epoch_Support; with System; package body Logging_Support is ----------------------------------------...
with Ada.Numerics.Complex_Arrays; use Ada.Numerics.Complex_Arrays; with Ada.Complex_Text_IO; use Ada.Complex_Text_IO; with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics.Complex_Elementary_Functions; with Generic_FFT; procedure Example is function FFT is new Generic_FFT (Ada.Numerics.Co...
----------------------------------------------------------------------- -- awa-audits-services -- AWA Audit Manager -- Copyright (C) 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 exce...
----------------------------------------------------------------------- -- hestia-display -- Display manager -- 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 not use this file excep...
with Ada.Numerics.Discrete_Random; with Ada.Strings.Fixed; with Gtk.Main; with Gtk.Handlers; with Gtk.Button; with Gtk.Window; with Gtk.GEntry; with Gtk.Editable; with Gtk.Box; with Gtk.Widget; with Glib.Values; with Gtkada.Dialogs; procedure Interaction is The_Value : Natural := 0; package Natural_Random is n...
-- { dg-do compile } package access3 is type TF is access function return access procedure (P1 : Integer); type TAF is access protected function return access procedure (P1 : Integer); type TAF2 is access function return access protected procedure (P1 : Integer); type TAF3 is access ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with ObjectPack, AbstractStrategyCombinatorPackage, IntrospectorPackage, StrategyPackage; use ObjectPack, AbstractStrategyCombinatorPackage, IntrospectorPackage, StrategyPackage; package MuVarStrategy is type MuVar is new AbstractStrategyCombinator and Object with record instance : StrategyPtr := null; name : a...
--------------------------------------------------------------------------------- -- Copyright 2004-2005 © Luke A. Guest -- -- This code is to be used for tutorial purposes only. -- You may not redistribute this code in any form without my express permission. ------------------------------------------------------------...
-- Ada_GUI implementation based on Gnoga. Adapted 2021 -- -- -- GNOGA - The GNU Omnificent GUI for Ada -- -- -- -- G N O G A . S ...
with AVR.TIMERS; -- ============================================================================= -- Package AVR.PWM_SIMPLEST -- -- Implements Pulsed Wavelength Modulation for MCU in a simple way. -- ============================================================================= package AVR.PWM_SIMPLEST is -- ======...
-- { dg-do run } with Init11; use Init11; with Text_IO; use Text_IO; with Dump; procedure Q11 is A1 : R1 := My_R1; B1 : R1 := My_R1; A2 : R2 := My_R2; B2 : R2 := My_R2; begin Put ("A1 :"); Dump (A1'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 ...
with Ada.Text_IO; use Ada.Text_IO; procedure Test_Ackermann is function Ackermann (M, N : Natural) return Natural is begin if M = 0 then return N + 1; elsif N = 0 then return Ackermann (M - 1, 1); else return Ackermann (M - 1, Ackermann (M, N - 1)); end if; ...
package Termbox_Package is type Input_Mode is (TB_INPUT_CURRENT, -- termbox.h:215 TB_INPUT_ESC, -- termbox.h:216 TB_INPUT_ALT, -- termbox.h:217 TB_INPUT_MOUSE -- termbox.h:218 ); type Output_Mode is (TB_OUTPUT_CURRENT, -- termbox.h:239 TB_OUTPUT_NORM...
-- { dg-do compile } -- { dg-options "-gnatws -O3" } -- { dg-options "-gnatws -O3 -msse" { target i?86-*-* x86_64-*-* } } with System.Soft_Links; package body Loop_Optimization9 is package SSL renames System.Soft_Links; First_Temp_File_Name : constant String := "GNAT-TEMP-000000.TMP"; Current_Temp_File_Na...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
-- -- Copyright (C) 2016-2017 secunet Security Networks AG -- -- 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 2 of the License, or -- (at your option) any later version. -- -- ...
procedure If_Statement is begin if True then null; else null; end if; end If_Statement;
------------------------------------------------------------------------------ -- 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 -- -- ...
-- SPDX-License-Identifier: MIT -- -- Copyright (c) 2019 onox <denkpadje@gmail.com> -- -- 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 limitatio...
with Arduino_Nano_33_Ble_Sense.IOs; with Ada.Real_Time; use Ada.Real_Time; procedure Main is TimeNow : Ada.Real_Time.Time := Ada.Real_Time.Clock; begin loop --6 13 41 16 24 Arduino_Nano_33_Ble_Sense.IOs.DigitalWrite(13, True); TimeNow := Ada.Real_Time.Clock; delay until TimeNow + Ada.Rea...
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Ada.Streams.Stream_IO; with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; with Interfaces; with Program.Scanners; package body Pro...