This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program main | |
implicit one !implicit=one | |
integer i; | |
real r; | |
print *, i, r | |
if (1.NE.i) print *, "1.NE.i" | |
if (1./= r) print *, "1./= r" | |
end program main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sql-implementation> ::= | |
<direct SQL statement> | |
<direct SQL statement> ::= | |
[ <separator> ] <directly executable statement> <semicolon> | |
<separator> ::= | |
{ <comment> | <white spaces> } ... | |
<comment> ::= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN | |
! 10 - no equal sign required | |
! 11 - equal sign required | |
integer :: icep = 302 !ie | |
integer :: nn | |
character(2) :: ch | |
character(1050) :: go | |
parameter(go = & | |
!01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 & ! cells col |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module m_sys | |
implicit none | |
public get_os_name | |
public get_user_home | |
public get_arg_prefix | |
public get_file_sep | |
character(len=20), save :: os_name = ' ' | |
character(len=255), save :: homedir = ' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! { dg-do run } | |
! { dg-shouldfail "Fortran runtime error: Assignment with unallocated RHS 'w'" } | |
! { dg-output "Fortran runtime error: Assignment with unallocated RHS 'w'" } | |
! Catch a Runtime error on intrinsic assignment of | |
! a class LHS with an unallocated RHS. | |
module testmode | |
implicit none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module m_type0 | |
type :: Type0 | |
contains | |
procedure :: eq => eq0 | |
end type Type0 | |
contains | |
logical function eq0(this,b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! { dg-do run } | |
! { dg-options "-fopenmp" } | |
! By default: -fallow-invalid-boz | |
! By default: Warn only few known non portable uses | |
! whereas -Wno-invalid-boz disables all related warnings, | |
! and -Winvalid-boz enables all related warnings. | |
program boz_extensions | |
integer, parameter :: p0 = Z'1234' | |
real,parameter :: rc = real(z'50CB9F09') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Profiled: 23ms (total time varies per optimization level) | |
! start libdyld.dylib: 12ms (52.1%) | |
! main program run: 11ms (47.8%) | |
! findloc: 9.1% of 11ms | |
! [The above representative percentages vary per run] | |
! Compiler: GNU Fortran 4.8.5 (github.com/drikosev/pc) | |
! Profiler: Instruments 9.3 | |
! OS: macOS 10.13 | |
! Computer: MBPR 2013 - 2,4 GHz Intel Core i7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sep 16, 2019 | |
Ev. Drikos | |
The program in this gist demonstrates how one can achieve | |
default initialization on Fortran derived types, since the | |
language does not inherently support such a functionality. | |
In Specific, Fortran allows the instantiation of an object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Fortran/C interoperability example implements a static dictionary | |
containing <numeric key, unicode text> pairs, which are defined in file | |
"dictionary.c" and a Fortran program ie can print them in a terminal. | |
To build the project in a Linux, MacOS, or Cygwin terminal you can use | |
the Makefile. If you have GNU Fortran installed, then just type "make". | |
In Windows 8.1 ie run dictionary.exe in a blue PowerShell Console. | |
NewerOlder