Skip to main content

Fortiori

A proof of concept for adding syntactic sugar to FORTRAN. The goal of fortiori is to provide a friendlier syntax for FORTRAN enthusiasts while still producing mostly-compliant FORTRAN code which can then be compiled normally using gfortran and the like.

Supported Features

  • Declaration of function return types in caller
  • Case-sensitive identifiers
  • Automatically add 'implicit none'
  • Return statement with value
  • Import/multi-file support
  • Convert void functions to subroutines
  • If-else conditional blocks
  • Do loops with inline variable declaration

Example (WIP)

integer function getFirstPrime(integer::lower, integer::higher) {
    return 5;
}

program {
    print*, "Getting a prime...";
    integer::Prime = getFirstPrime(1,10);
    integer::PRIME = 10;
    if (PRIME == 10) {
    print*, "condition is true";
    } else {
    print*, "condition is false";
    }

    do integer::n = 1,10 {
    print*, n;
    }
    do while ( n < 15) {
       print*, n, "incrementing...";
       n = n+1;
    }

    print*, "This is a prime:", Prime;
    print*, "This is another prime:", PRIME;
}

This would yield the following FORTRAN code

integer function getf$irstp$rime(lower,higher) 
implicit none;
integer::lower
integer::higher
 getf$irstp$rime = 5;
return;
end function;
program main 
implicit none;
integer::getf$irstp$rime;
integer::p$rime;
integer::p$$rime$$;
 integer::n;
print*, "Getting a prime...";
p$rime = getf$irstp$rime(1,10);
p$$rime$$ = 10;
 if (p$$rime$$ == 10) then
 print*, "condition is true";
 else
 print*, "condition is false";
 end if;
do n = 1,10 
 print*, n;
 
end do;
 do while ( n < 15) 
 print*, n, "incrementing...";
 n = n+1;
 
end do;
 print*, "This is a prime:", p$rime;
 print*, "This is another prime:", p$$rime$$;
end program;⏎ 

Metadata

Release files for fortiori 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fortiori 0.0.0
File Size Uploaded Provenance
fortiori-0.0.0.tar.gz 7.8 kB Without provenance Details

Release files / fortiori-0.0.0.tar.gz

Download URL fortiori-0.0.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
79be05b057c8aeeed5cd4d730d42fb8b90a7aad2907477460e484e744915d5aa
BLAKE2b-256 checksum
How to use checksums
c26d24603adb9f85e533f6744eb89bc3209e23fb01cc45d84aaf8c3a8bdd85de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7

Security for fortiori 0.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page