Ada. Time-tested, safe and secure.
Driver on

Ada Programming/Libraries/Interfaces.Fortran – Wikibooks, open books for an open world

Computing » Laptop Science » Laptop Programming » Ada Programming

Ada. Time-tested, safe and secure.

This language function is obtainable from Ada 95 on.

Interfaces.Fortran is a unit of the Predefined Language Surroundings since Ada 95.

Specification[edit]

with Ada.Numerics.Generic_Complex_Types;  --  see G.1.1
pragma Elaborate_All(Ada.Numerics.Generic_Complex_Types);
package deal Interfaces.Fortran is
   pragma Pure(Fortran);

   kind Fortran_Integer is vary implementation-outlined;

   kind Actual             is digits implementation-outlined;
   kind Double_Precision is digits implementation-outlined;

   kind Logical is new Boolean;

   package deal Single_Precision_Complex_Types is
      new Ada.Numerics.Generic_Complex_Types (Actual);

   kind Complicated is new Single_Precision_Complex_Types.Complicated;

   subtype Imaginary is Single_Precision_Complex_Types.Imaginary;
   i : Imaginary renames Single_Precision_Complex_Types.i;
   j : Imaginary renames Single_Precision_Complex_Types.j;

   kind Character_Set is implementation-outlined character kind;

   kind Fortran_Character is array (Constructive vary <>) of Character_Set
      with Pack;

   perform To_Fortran (Merchandise : in Character) return Character_Set;
   perform To_Ada (Merchandise : in Character_Set) return Character;

   perform To_Fortran (Merchandise : in String) return Fortran_Character;
   perform To_Ada     (Merchandise : in Fortran_Character) return String;

   process To_Fortran (Merchandise       : in String;
                         Goal     : out Fortran_Character;
                         Final       : out Pure);

   process To_Ada (Merchandise     : in Fortran_Character;
                     Goal   : out String;
                     Final     : out Pure);

finish Interfaces.Fortran;

See additionally[edit]

Wikibook[edit]

  • Ada Programming/Libraries/Interfaces

Exterior examples[edit]

  • Seek for examples of Interfaces.Fortran in: Rosetta Code, GitHub or this Wikibook.
  • Seek for any put up associated to Interfaces.Fortran in: Stack Overflow, comp.lang.ada or any Ada associated web page.

Ada Reference Handbook[edit]

Ada 95[edit]

  • B.5: Interfacing with Fortran (Annotated)

Ada 2005[edit]

  • B.5: Interfacing with Fortran (Annotated)

Ada 2012[edit]

  • B.5: Interfacing with Fortran (Annotated)

Open-Supply Implementations[edit]

FSF GNAT

  • Specification: i-fortra.adverts
  • Physique: i-fortra.adb

drake

  • Specification: numerics/i-fortra.adverts
  • Physique: numerics/i-fortra.adb

Leave a Reply

Your email address will not be published. Required fields are marked *