1

In Ipython can someone use a FORTRAN function in python code,with this way:

%load_ext fortranmagic
%%fortran 
subroutine f1(x, z)
    real, intent(in) :: x
    real, intent(out) :: z
    integer :: i
    do i=1,10000
        z = 1000*sin(x+i)
    enddo
end subroutine f1
print(f1(22))

Is there any similar way to use a C++ function with %%cpp ??

1 Answer 1

0

You can use jupyter-cpp-kernel or xeus-cling to write cpp code, but neither of them supports magic like %%cpp.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.