Implement embed() feature
It would work exactly like IPython.embed()
. In Fortran it would be used like:
use lfortran, only: embed
...
call embed()
and LFortran will compile the code to an executable that one can execute and when the execution enters the embed()
function, an interactive LFortran prompt will show and allow to interactively execute any Fortran code, it will see all the local and global variables, can print arrays, etc.
This feature is very useful for:
- general debugging
- to figure out how to write a test for some new functionality (one interactively figures out what array statistic would make sense to test in the interactive prompt, and then one can test for this in the test)
Edited by Ondřej Čertík