Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/beliavsky/fortranshell

Interactive console program in which to edit, compile, and run Fortran code using gfortran or another compiler
https://github.com/beliavsky/fortranshell

fortran gfortran repl

Last synced: 3 days ago
JSON representation

Interactive console program in which to edit, compile, and run Fortran code using gfortran or another compiler

Awesome Lists containing this project

README

        

# FortranShell
Interactive console program in which to edit, compile, and run Fortran code, tested on Windows and Linux.

Compile with `gfortran -o fedit.exe buffer.f90 xbuffer_code.f90`

Sample session:

```
c:\fortran\test>fedit.exe
> print*,2**5;
32
> del
> imp
> integer :: i
> do i=1,4
> print*,i,i**2
> end do
> list
1: implicit none
2: integer :: i
3: do i=1,4
4: print*,i,i**2
5: end do
> run
1 1
2 4
3 9
4 16
> q
STOP done -- code saved in temp.f90
```

Entering "help" or "h" gives these directions:
```
enter a line of Fortran code. Otherwise, ...
quit or q to quit
run or r to compile and run executable
a line of code terminated by ; causes the program to be compiled and run
runold or ro to run executable again without recompiling
compile to compile without running executable
list or l for a program listing with line numbers
barelist or bl for a program listing without line numbers
del to delete all code; del i to delete line i ; del i j to delete lines i to j
line n to replace the current line n with
insert n to move lines n on down by 1 and put on line n
imp is expanded to implicit none
```
`fedit.exe foo.f90` pulls in code from `foo.f90`. Otherwise the program starts blank. In most cases
an ```end``` is supplied automatically and need not be supplied by the user.