Jump to content

Shell one-liner: Difference between revisions

(FORTRAN entry)
Line 157:
 
=={{header|FORTRAN}}==
This example, stolen from the [[InternalLink|c]] example is subject to the same caveats. While contrived, FORTRAN as a one liner can easily handle some unique tasks. Let's plot a Bessel function:
<lang bash>
$ gawk 'BEGIN{print" write(6,*\"(2(g12.3,x))\")(i/10.0,besj1(exp(1i/10.0), i=0,1000)\n endnend";exit(0)}'|gfortran -x f77f95 - && gnuplot -p -e 'plot "<./a.out" t "Bessel function of 1st kind" w l'
0.435962617
</lang>
[[Image:Bessel1.jpg]]
 
=={{header|Gema}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.