Imported GNU Classpath 0.90
[official-gcc.git] / gcc / ada / i-fortra.ads
blobda330d2a4f793c76d1a464b67c0d987e088677a9
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- I N T E R F A C E S . F O R T R A N --
6 -- --
7 -- S p e c --
8 -- --
9 -- This specification is adapted from the Ada Reference Manual for use with --
10 -- GNAT. In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification, provided that if you redistribute a --
12 -- modified version, any changes that you have made are clearly indicated. --
13 -- --
14 ------------------------------------------------------------------------------
16 with Ada.Numerics.Generic_Complex_Types;
17 pragma Elaborate_All (Ada.Numerics.Generic_Complex_Types);
19 package Interfaces.Fortran is
20 pragma Pure;
22 type Fortran_Integer is new Integer;
23 type Real is new Float;
24 type Double_Precision is new Long_Float;
26 type Logical is new Boolean;
27 for Logical'Size use Integer'Size;
28 pragma Convention (Fortran, Logical);
29 -- As required by Fortran standard, stand alone logical allocates same
30 -- space as integer (but what about the array case???). The convention
31 -- is important, since in Fortran, Booleans have zero/non-zero semantics
32 -- for False/True, and the pragma Convention (Fortran) activates the
33 -- special handling required in this case.
35 package Single_Precision_Complex_Types is
36 new Ada.Numerics.Generic_Complex_Types (Real);
38 type Complex is new Single_Precision_Complex_Types.Complex;
40 subtype Imaginary is Single_Precision_Complex_Types.Imaginary;
41 i : Imaginary renames Single_Precision_Complex_Types.i;
42 j : Imaginary renames Single_Precision_Complex_Types.j;
44 type Character_Set is new Character;
46 type Fortran_Character is array (Positive range <>) of Character_Set;
48 function To_Fortran (Item : Character) return Character_Set;
49 function To_Ada (Item : Character_Set) return Character;
51 function To_Fortran (Item : String) return Fortran_Character;
52 function To_Ada (Item : Fortran_Character) return String;
54 procedure To_Fortran
55 (Item : String;
56 Target : out Fortran_Character;
57 Last : out Natural);
59 procedure To_Ada
60 (Item : Fortran_Character;
61 Target : out String;
62 Last : out Natural);
64 end Interfaces.Fortran;