Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/beliavsky/fortranshell
- Owner: Beliavsky
- License: mit
- Created: 2022-03-19T16:43:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T14:14:33.000Z (almost 3 years ago)
- Last Synced: 2024-12-03T00:18:10.268Z (2 months ago)
- Topics: fortran, gfortran, repl
- Language: Fortran
- Homepage:
- Size: 46.9 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 nto replace the current line n with
insert nto 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.