Are Fortran control characters (carriage control) still implemented in compilers?

In years past, ignoring this use of the first column could cause bad things on a line printer, like page ejects — but when was the last time that you saw a line printer? Otherwise it was output device, compiler and OS dependent. The advice of “Fortran 95/2003 for Scientists and Engineers” was excellent for … Read more

Having parameter (constant) variable with NaN value in Fortran

To add to Vladimir F’s answer I’ll mention that gfortran 5.0 (but not earlier) supports the IEEE intrinsic modules. Instead of real x x=0 x=0/x one can use use, intrinsic :: iso_fortran_env use, intrinsic :: ieee_arithmetic integer(int32) i real(real32) x x = ieee_value(x, ieee_quiet_nan) i = transfer(x,i) This gives you a little flexibility over which … Read more

How to override a structure constructor in fortran

Is it currently possible to override the structure constructor in Fortran? No. Anyway even using your approach is completely not about constructor overriding. The main reason is that structure constructor # OOP constructor. There is some similarity but this is just another idea. You can not use your non-intrinsic function in initialization expression. You can … Read more

Mac OS X R error “ld: warning: directory not found for option”

You need to modify the ~/.R/Makevars file. For a greater overview of this see: https://cran.r-project.org/doc/manuals/r-release/R-admin.html#OS-X-packages Alternatively, this has been answered before in a bit more depth by @kevin-ushey in Rcpp warning: “directory not found for option ‘-L/usr/local/Cellar/gfortran/4.8.2/gfortran’”. What is happening is your code is not being run under gcc instead it is being forwarded to … Read more