content
stringlengths
23
1.05M
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Ada.Calendar.Arithmetic; with Ada.Calendar.Formatting; with Ada.Text_IO; procedure Main is use Ada.Calendar; use Arithmetic; function Get_Easter (Year : Year_Number) return Time is A : Integer := Year mod 19; B : Integer := Year / 100; C : Integer := Year mod 100; D : Integer := ...
with Text_IO; procedure Test_End_Of_File is file : Text_IO.FILE_TYPE; last : CHARACTER := ' '; begin Text_IO.Open( file, Text_IO.IN_FILE, "abc" ); loop exit when Text_IO.End_Of_File( file ); begin Text_IO.Get( file, last ); ...
with Agar; with Agar.Event; package myeventhandler is package EV renames Agar.Event; procedure Ping (Event : EV.Event_Access) with Convention => C; procedure Some_Event (Event : EV.Event_Access) with Convention => C; end myeventhandler;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with Ada.Strings.Fixed; with Ada.Strings.Unbounded; with Ada.Text_IO; with Ada.Command_Line; procedure Strip is use Ada.Strings.Unbounded; procedure Print_Usage is begin Ada.Text_IO.Put_Line ("Usage:"); Ada.Text_IO.New_Line; Ada.Text_IO.Put_Line (" strip <file> [<opening> [<closing>]]"); ...
-- @file coverage_for_ada_task.adb -- @date 28 May 2022 -- @author Chester Gillon -- @brief Example program to test getting coverage for an Ada task with Ada.Text_IO; with Ada.Command_Line; procedure Coverage_For_Ada_Task is generic Name : String; package Generic_Name is procedure Display_Name; e...
-- AOC 2020, Day 2 with Ada.Text_IO; use Ada.Text_IO; with Day; use Day; with Ada.Containers; use Ada.Containers; procedure main is passwords : constant Password_Vector.Vector := load_passwords("input.txt"); count : constant Count_Type := count_valid(passwords); positions : constant Count_Type := count_valid_pos...
----------------------------------------------------------------------- -- awa-users-tests -- Unit tests for AWA users -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -...
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- 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 -- -- ...
-- part of FreeTypeAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with FT.Faces; package FT.Glyphs is pragma Preelaborate; type Glyph_Reference is limited new Ada.Finalization.Limited_Controlled with private; -- call this to destruct the overridin...
-- -- Radoslaw Kowalski 221454 -- with Ada.Text_IO; use Ada.Text_IO; with GNAT.OS_Lib; use GNAT.OS_Lib; with Ada.Command_line; use Ada.Command_Line; with Ada.Calendar; with Ada.Exceptions; use Ada.Exceptions; with GNAT.String_Split; use GNAT.String_Split; with Ada.Strings.Unbounded; ...
with Stream; with System; with Ada.Unchecked_Conversion; package body Hello_Ada is x : Integer := 12345; procedure Start (console : Stream.Stream'Class) is function Address_To_Unsigned is new Ada.Unchecked_Conversion (Source => System.Address, Target => Stream.Unsigned); begin console.Put_String ("Hel...
-- { dg-do compile } package abstract_limited is type I is limited interface; type T is abstract limited new I with null record; end;
----------------------------------------------------------------------- -- css-analysis-duplicates -- Duplicate CSS Rule Analysis -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use ...
----------------------------------------------------------------------- -- mat-interrupts - SIGINT management to stop long running commands -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you ma...
------------------------------------------------------------------------------ -- -- -- J E W L -- -- -- ...
with C.winbase; package body System.Multiprocessors is function Number_Of_CPUs return CPU is Info : aliased C.winbase.SYSTEM_INFO; begin C.winbase.GetSystemInfo (Info'Access); return CPU (Info.dwNumberOfProcessors); end Number_Of_CPUs; end System.Multiprocessors;
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Definitions; use Definitions; with HelperText; private with Utilities; package Parameters is package HT renames HelperText; no_ccache : constant String := "none"; no_unkindness : constant Str...
-- { dg-do run } procedure range_check is function ident (x : integer) return integer is begin return x; end ident; guard1 : Integer; r : array (1 .. ident (10)) of integer; pragma Suppress (Index_Check, r); guard2 : Integer; begin guard1 := 0; guard2 := 0; r (11) := 3; end;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Element_Vectors; package Program.Elements.Expressions is pragma Pure (Program.Elements.Expressions); type Expres...
-- ----------------------------------------------------------------------------- -- smk, the smart make (http://lionel.draghi.free.fr/smk/) -- © 2018, 2019 Lionel Draghi <lionel.draghi@free.fr> -- SPDX-License-Identifier: APSL-2.0 -- ----------------------------------------------------------------------------- -- Licen...
with AUnit; with AUnit.Test_Fixtures; package SA_Definite_Tests is type Test_Fixture is new AUnit.Test_Fixtures.Test_Fixture with null record; procedure TestAlloc_WithForcingStorageError_ResultNullReturned(T : in out Test_Fixture); end SA_Definite_Tests;
-- This unit provides an abstract type to decode COBS byte per byte. It can -- stream data because the full input frame is not required to start decoding. -- -- To use this decoder, declare a tagged type that inherit from this one and -- implement a Flush procedure that will receive the encoded data from the -- en...
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- ...
-- Unit.adb with Interfaces.C; use Interfaces; package body Unit is function Add (A, B : Integer) return Integer is begin return A + B; end Add; end Unit;
package body Zip.CRC is CRC32_Table : array (Unsigned_32'(0) .. 255) of Unsigned_32; procedure Prepare_table is -- CRC - 32 algorithm, ISO - 3309 Seed : constant := 16#EDB88320#; l : Unsigned_32; begin for i in CRC32_Table'Range loop l := i; for bit in 0 .. 7 loop ...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" private with GL.Low_Level; package GL_Enums_Feedback is pragma Preelaborate; type Feed_Back_Mode is (Feed_Back_2D, Feed_back_3D , Color_3D, Color_Texture_3D, Color_T...
with gel.Forge, gel.Window.lumen, gel.Applet.gui_world, gel.Camera, gel.Sprite, physics.Model, openGL.Model.box.colored, openGL.Palette, ada.Text_IO, ada.Exceptions; pragma unreferenced (gel.window.lumen); procedure launch_drop_Box_on_Box -- -- Drops a box onto a b...
-- At the beginning of each line, puts out white space relative to the -- current indent. Emits Wide text: package Indented_Text is -------------------------------------------------------- -- Trace routines emit no output when Trace_On is False. At the moment, -- Indented_Text.Class output routines call the...
package Opt50_Pkg is type Enum is (One, Two, Three); for Enum'Size use 16; type Enum_Boolean_Array is array (Enum range <>) of Boolean; procedure Get (Kind : String; Result : out Enum; Success : out Boolean); procedure Set (A : Enum_Boolean_Array); end Opt50_Pkg;
with DDS.Request_Reply.Requester.Typed_Requester_Generic; with Dds.Builtin_String_DataReader; with Dds.Builtin_String_DataWriter; package DDS.Request_Reply.Tests.Simple.Requester is new DDS.Request_Reply.Requester.Typed_Requester_Generic (Request_DataWriter => Dds.Builtin_String_DataWriter, Reply_DataReader ...
package myarray is type Vector is array (Integer range <>) of Float; type Matrix is array (Integer range <>, Integer range <>) of Float; function "+" (Left : in Vector; Right : in Vector) return Vector; function "+" (Left : in Matrix; Right : in Matrix) re...
with System.Storage_Elements; use System.Storage_Elements; procedure Dump (A : System.Address; Len : Storage_Offset);
with Ada.Text_IO; use Ada.Text_IO; with Ada.Streams.Stream_IO; with Parser; use Parser; with X86Parser; use X86Parser; with X86Writer; use X86Writer; with Elf; use Elf; procedure Main is package Stream_IO renames Ada.Streams.Stream_IO; Lines, Data, Code : Parts_Vector.Vector; instr : Instr_Vector.Vector;...
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with Interfaces.C.Extensions; package color_h is -- BSD 3-Clause License -- * -- * Copyright © 2008-2021, Jice and the libtcod contributors. -- * All rights reserved. -- * -- * Redistribution and use in source and binary for...
with STM32_SVD; use STM32_SVD; package STM32GD.USART is pragma Preelaborate; type USART_Data is array (Natural range <>) of Byte; end STM32GD.USART;
-- 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 AWS; use AWS; with AWS.Response; with AWS.Server; with AWS.Status; with Ada.Text_IO; use Ada.Text_IO; procedure HelloHTTP is function CB (Request : Status.Data) return Response.Data is pragma Unreferenced (Request); begin return Response.Build ("text/html", "Hello world!"); end CB; TheServe...
generic type Element_Type is private; C_MAX_NUMBER : POSITIVE; package Q_GEN_SHUFFLE is type Array_Type is array (Positive range 1 .. C_MAX_NUMBER) of Element_Type; procedure P_Shuffle (List : in out Array_Type); end Q_GEN_SHUFFLE;
-- Module : string_pkg_.ada -- Component of : common_library -- Version : 1.2 -- Date : 11/21/86 16:35:52 -- SCCS File : disk21~/rschm/hasee/sccs/common_library/sccs/sxstring_pkg_.ada -- $Source: /nosc/work/abstractions/string/RCS/string.spc,v $ -- $Revision: 209 $ -- $Date: 2013-11-30 21:03:24...
-- This package has been generated automatically by GNATtest. -- Do not edit any part of it, see GNATtest documentation for more details. -- begin read only with GNATtest_Generated; package Tk.TtkEntry.Ttk_Entry_Options_Test_Data.Ttk_Entry_Options_Tests is type Test_Ttk_Entry_Options is new GNATtest_Generated....
with GL, System; package GLU with Obsolescent -- -- Provides a subset of the functions in GLU, tailored to be suitable for use with the openGL 'Embedded' profile. -- -- Currently only 'gluScaleImage' is ported. -- is use GL; procedure gluScaleImage (Format : in GLenum; ...
-------------------------------------------------------------------------------------- -- -- Copyright (c) 2016 Reinert Korsnes -- 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...
----------------------------------------------------------------------- -- awa-events -- AWA Events -- Copyright (C) 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 except in compliance...
------------------------------------------------------------------------------ -- -- -- Copyright (c) 2016-2021 Vitalii Bondarenko <vibondare@gmail.com> -- -- -- ----...
-- Copyright (c) 2020-2021 Bartek thindil Jasicki <thindil@laeran.pl> -- -- 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 vers...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2018, AdaCore -- -- -- -- ...
with AdaBase; with Connect; with CommonText; with Ada.Text_IO; with Ada.Exceptions; with Ada.Calendar.Formatting; with AdaBase.Results.Sets; with AdaBase.Logger.Facility; with Interfaces; with GNAT.Traceback.Symbolic; procedure All_Types is package CON renames Connect; package TIO renames Ada.Text_IO; packag...
----------------------------------------------------------------------- -- openapi-clients -- Rest client support -- Copyright (C) 2017, 2018, 2019, 2020, 2022 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may ...
with Suma_Divisores_Propios; function Es_Abundante(N: Integer) return Boolean is begin if Suma_Divisores_Propios(N) > N then return True; end if; return False; end Es_Abundante;
-- 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...
pragma License (Unrestricted); -- implementation unit with System; private package Ada.Containers.Binary_Trees is pragma Preelaborate; type Node; type Node_Access is access Node; type Node is limited record Left, Right, Parent : Node_Access; end record; -- traversing function First (Cont...
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.EXTI is pragma Preelaborate; --------------- -- Registers -- --------------- -- RTSR1_TR array type RTSR1_TR_Field_Ar...
separate (Numerics.Sparse_Matrices) function Omega (N : in Nat; M : in Pos := 0) return Sparse_Matrix is Result : Sparse_Matrix; use Ada.Containers; begin ----------------------------------------------- -- omega (N, M) = [ 0_N -1_N ] -- [ 1_N 0_N ] -- ...
pragma Source_Reference (1, "p2.adb"); procedure Source_Ref2 is pragma Source_Reference (2, "p2.adb"); begin null; end;
------------------------------------------------------------------------------ -- -- -- Copyright (c) 2014-2016 Vitalij Bondarenko <vibondare@gmail.com> -- -- -- ----...
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2018 Luke A. Guest -- -- 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 fr...
-- AOC 2020, Day 9 with Ada.Containers.Vectors; package Day is package XMAS_Vector is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Long_Integer); use XMAS_Vector; function load_file(filename : in String) return XMAS_Vector.Vector; function first_invalid(v : in XMAS_Vector....
with Symbex.Parse; package Symbex.Walk is type Walk_Status_t is (Walk_Continue, Walk_Finish_List, Walk_Finish_Tree, Walk_Error); generic with procedure Handle_List_Open (List_ID : in Parse.List_ID_t; Depth : in Parse.List_Depth_t; Status : out Walk_Status_...
with RP.Device; with RP.Clock; with RP.GPIO; with Pico; package body BB_Pico_Bsp is begin RP.Clock.Initialize (Pico.XOSC_Frequency); RP.Clock.Enable (RP.Clock.PERI); RP.Device.Timer.Enable; RP.GPIO.Enable; RP.DMA.Enable; end BB_Pico_Bsp;
with YAML; private with Ada.Finalization; package Serialization.YAML is pragma Preelaborate; type Reference_Type ( Serializer : not null access Serialization.Serializer) is limited private; function Reading ( Parser : not null access Standard.YAML.Parser; Tag : String) return Reference_Type; function ...
----------------------------------------------------------------------------- -- Symbolic Expressions (symexpr) -- -- Copyright (C) 2012, Riccardo Bernardini -- -- This file is part of symexpr. -- -- symexpr is free software: you can redistribute it and/or modify -- it under the ...
-- Copyright (c) 2015-2017 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Incr.Nodes.Joints is ------------------ -- Constructors -- ------------------ package body Constructor...
package body Test_Call_Filtering is type T is tagged null record; function P(Self : T) return T is begin return Self; end P; function Q(Self : T; I : Integer) return T is begin return Self; end Q; procedure Test is E : T; begin E := E.P.P; E := ...
-- This spec has been automatically generated from FE310.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package FE310_SVD.UART is pragma Preelaborate; --------------- -- Registers -- --------------- subtype TXDATA_DATA_Field is HAL....
-- -- Copyright (C) 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. -- -- This ...
with Interfaces.C; package body Minimal is package IC renames Interfaces.C; use all type GDNATIVE_API_TYPES; Core_Api : godot_gdnative_core_api_struct_ptr; Nativescript_Api : godot_gdnative_ext_nativescript_api_struct_ptr; procedure Godot_Print (Item : in Wide_String) is C_Item : IC.wc...
------------------------------------------------------------------------------- -- Copyright 2021, The Trendy Terminal Developers (see AUTHORS file) -- 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 Lic...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------- -- 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...
-- { dg-excess-errors "cannot generate code" } package Pack10_Pkg is generic type Vector_Type (<>) is private; procedure Proc; end Pack10_Pkg;
-- { dg-do compile } procedure Discr_Test2 is type Ptr is access all integer; type Ar is array (Integer range <>) of Ptr; type Inner (Discr : Integer) is record Comp : Ar (1..Discr); end record; type Wrapper (Discr : Integer) is record Comp : Inner (Discr); end record; Val...
-- file: weirdcal.ads package Antikythera_Calendar is subtype calendar_year is Integer range 1 .. Integer`Last; subtype duration_of_day is Duration range 0.0 .. 86_400.00; subtype num_day_of_year is Integer range 1 .. 365; subtype num_month_of_year is Integer range 1 .. 13; subtype num_day_of_month is ...
-- MIT License -- -- Copyright (c) 2020 Max Reznik -- -- 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, copy, mo...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019-2020, AdaCore -- -- -- -- ...
with Lv.Hal.Indev; package BB_Pico_Bsp.LVGL_Backend is procedure Initialize (Enable_Pointer : Boolean := True); function Keypad_Indev return Lv.Hal.Indev.Indev_T; end BB_Pico_Bsp.LVGL_Backend;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, AdaCore -- -- -- -- ...
----------------------------------------------------------------------- -- serialize-io-xml-tests -- Unit tests for XML serialization -- Copyright (C) 2011, 2012, 2016, 2017, 2018, 2021 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (th...
-- Import necessary packages with Ada.Text_IO; -- Our main function is "Hello_World" procedure Hello_World is -- Declare local variables here begin -- Execute statements here. -- Include the full package, like Python Ada.Text_IO.Put_Line("Hello, world!"); end Hello_World; -- Semicolon ends statements, ...
with Ada.Finalization; with Ada.IO_Exceptions; with Ada.Streams; private with System; package iconv is pragma Preelaborate; -- get info function Version return String; pragma Inline (Version); -- renamed procedure Iterate (Process : not null access procedure (Name : in String)); pragma Inline (Iterate);...
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- with Ada.Command_Line; with Command_Line;...
with ada.text_io, ada.integer_text_io; use ada.text_io, ada.integer_text_io; function factorial (n1: in Integer) return Integer is resultado : Integer := 1; n1c := Integer; begin n1c := n1; if n1c > 0 then loop exit when n1c = 0; resultado:=resultado*n1c; n1c := n1c-1; end loop; end if; return re...
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- @author Alexander Senier -- @date 2019-01-21 -- -- Copyright (C) 2018 Componolit GmbH -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without...
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with asm_generic_int_ll64_h; package linux_types_h is -- * Below are truly Linux-specific types that should never collide with -- * any application/library that wants linux/types.h. -- subtype uu_le16 is asm_generic_int_ll64...
-- PR ada/48844 -- Reported by Georg Bauhaus <bauhaus@futureapps.de> */ -- { dg-do compile } procedure Discr30 is generic type Source is private; type Target is private; function Conversion (S : Source) return Target; function Conversion (S : Source) return Target is type Source_Wrapper is ...
------------------------------------------------------------------------------ -- 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 2008, Google Inc. 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 list of conditio...
private with bresenham_h; package Libtcod.Maps.Lines is -- Represent line in a data structure type Line is limited private; function make_line(start_x : X_Pos; start_y : Y_Pos; end_x : X_Pos; end_y : Y_Pos) return Line; procedure copy_line(a : Line; b : out Line); function ste...
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; with Ada.Numerics.Elementary_Functions; procedure sqrttest is type stringptr is access all char_array; procedure PString(s : stringptr)...
------------------------------------------------------------------------------- -- -- -- Coffee Clock -- -- -- ...
--- ad-indices.adb.orig 2021-09-04 16:03:27 UTC +++ ad-indices.adb @@ -41,13 +41,10 @@ pragma License (GPL); with Ada.Characters.Handling; -with Ada.Finalization; -with Ada.Strings.Maps; -with Ada.Strings.Unbounded; with Ada.Strings.Wide_Unbounded; with Ada.Unchecked_Deallocation; +with System; -with Asis; wit...
-- -- Copyright (C) 2015-2016 secunet Security Networks AG -- Copyright (C) 2016 Nico Huber <nico.h@gmx.de> -- -- 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,...
-- { dg-do compile } -- { dg-options "-O" } package body Discr31 is function Log_Item(Packet : in Packet_Data_Type) return Log_Item_Type is None : Log_Item_Type(0); begin return None; end; end Discr31;
----------------------------------------------------------------------- -- AWA.Sysadmin.Models -- AWA.Sysadmin.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-body.xhtml -- Ada Generator: https://ada-...
-- { dg-do compile } -- { dg-options "-O" } with System.Machine_code; use System.Machine_code; procedure Constant3 is c : Integer := -1; r : Integer; procedure Conv (res : out Integer; v : Integer) is v1 : constant Integer := v; begin Asm ("", Integer'Asm_output ("=m", res), Integer'Asm_input("m", v...
with STM32_SVD.HSEM; use STM32_SVD.HSEM; with System; package body STM32.HSEM is function OneStepLock (Semaphore : UInt5) return Boolean is Idx : Sema_Range := Sema_Range (Semaphore); begin return not (STM32_SVD.HSEM.HSEM_Periph.RLR (Idx).LOCK and (STM32_SVD.HSEM.HSEM_Perip...
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016, AdaCore -- -- -- -- ...
--with Generic_Sensor; use Generic_Sensor with I2C_Interface; with I2C_Interface; with HAL_Interface; with HAL_Interface; procedure main with SPARK_Mode is I2C : I2C_Interface.I2C_Type; data : HAL_Interface.Data_Type(1 ..2) := (others => 0); begin I2C.write(17, data); end main;