REAL and COMPLEX equality/inequality comparisons2248 (8/22/2012 8:55:42 PM) comp.lang.fortran What do people think about comparisons for equality/inequality
for REAL and COMPLEX numbers?
Should compilers warn about them when "normal" warnings like gfortran's
-Wall is used?
Should compilers warn ... Thomas
Internal read with PAD327 (4/20/2012 7:34:40 PM) comp.lang.fortran Consider the following program:
program main
character(len=3) :: c
c = ' 3 '
read(unit=c,fmt='(I1000)') i
print *,i
end
Should this cause an end-of-record condition to occur? I do not
find ... Thomas
RfD: I/O through an external program1461 (3/4/2012 8:51:16 AM) comp.lang.fortran Sometimes, it can be convenient to filter I/O through an external program. One case would be reading/writing compressed data without the need to have the uncompressed data present as a file. Another would be ... Thomas
Function attributes in module specification434 (2/8/2012 8:21:00 PM) comp.lang.fortran The following seems quite wrong, but I cannot find anything in the standard or the Fortran handbook that prohibits this: MODULE TESTS dimension :: k(4) CONTAINS function k() k = 35 end function k END... Thomas
Purer than PURE procedures642 (12/19/2011 8:05:03 PM) comp.lang.fortran Hello, would it make sense to have procedures which are like PURE procedures, except that they would be forbidden to access module, host-associated and storage-associated variables also for reading? The aim w... Thomas
OMP workshare question480 (11/12/2011 4:36:52 PM) comp.lang.fortran Hello, a question regarding OMP WORKSHARE: Is the following (slighly artifical) code correct? program foo implicit none integer, parameter :: n = 10000 real :: tmp real :: A(n), B(5) B(1) = 3.344 ... Thomas
Grouping digits744 (8/3/2011 10:33:25 PM) comp.lang.fortran Listing the advantages of fixed form is a short and pleasant task: a) You can use British English spelling of "program", i.e. write PROGRAMME MAIN b) You can put blanks into numbers to group digits and... Thomas
Function side effects (again)1540 (3/15/2011 8:24:07 PM) comp.lang.fortran Consider the following program: program main external f real a, f a = f(3.) + f(3.) end real function f(x) real x print *,x f = x end Two questions... Thomas
C_LOC tt%t%i(1) where tt%t is an array731 (1/12/2011 8:01:59 PM) comp.lang.fortran Please consider the following program. Is it valid or not? use iso_c_binding type, bind(c) :: t1 integer :: i(5) end type t1 type, bind(c):: t2 type(t1) :: t(5) end type t2 ty... Thomas
Functions with side effects #29149 (7/14/2010 6:45:08 PM) comp.lang.fortran Please consider the following program. module foo implicit none integer :: n = 0 contains integer function f(k) integer, intent(in) :: k f = k n = n + 1 end function f end module foo progr... Thomas
suggestions for restricted sharing of variables7952 (5/30/2012 8:16:57 PM) comp.lang.fortran In the old days, I had several routines in one file and of course COMMON
blocks for global variables. If variables were needed by only a subset
of the routines, then I had these in a COMMON block which was... helbig(4873)
Is there a way to do the following...3751 (6/15/2012 5:16:48 PM) comp.lang.fortran Fortran gurus:
I am trying to define a sqrt operator for a derived type.
I would like to be able to bind the sqrt to the derived type and use it like the regular intrinsic sqrt.
Here is an example of wha... lewis.john.lloyd(6)
memory alignment1459 (6/17/2012 3:36:31 PM) comp.lang.fortran Hi,
I am using some C interoperability with sse instructions. sse
instructions exist in both aligned and non aligned data.
As the aligned instructions are faster can I tell fortran to align data
on 16by... pascal22p(46)
X = DBLE(Y)4571 (7/22/2012 1:51:35 PM) comp.lang.fortran I have some code in DOUBLE PRECISION which, however, has real input and
output values. The input values are converted to internal variables via
DBLE and the results are converted to the output values via R... helbig(4873)
WHy Fortran SELECT statment has an extra CASE at the top?74105 (7/24/2012 10:07:55 AM) comp.lang.fortran I am newbie and learning a bit of Fortran, and noticed that Fortran
SELECT is kind'a strange. Why the duplicate use of CASE at the top
and also in each branch?
------------------------------
SELECT CASE(n... Nasser
REAL and COMPLEX equality/inequality comparisons2248 (8/22/2012 8:55:42 PM) comp.lang.fortran What do people think about comparisons for equality/inequality
for REAL and COMPLEX numbers?
Should compilers warn about them when "normal" warnings like gfortran's
-Wall is used?
Should compilers warn ... tkoenig1(168)
C to Fortran?4665 (8/27/2012 2:08:54 PM) comp.lang.fortran I've seen several posts here recently apparently made by people used to
C/C++ who are novices at Fortran. I don't know if this is a general
trend? Could it be that people doing technical programming are s... usenet1820(74)
binary data #27296 (8/30/2012 9:40:13 AM) comp.lang.fortran Hi!
My dosimeters provide data ASCII data-files, providing the data in 16-bit h=
exadecimal words. Reading in these words goes well. I declared them as foll=
ows:
CHARACTER(4) :: MyWord
In SOME ca... arjan.van.dijk(248)
"Implicit" use of assignment(=)2463 (9/15/2012 2:49:23 PM) comp.lang.fortran Recently I noticed that overloaded assignment operator has no effect when i=
t is called "implicitly", in cases demonstrated by the following program:
module a_mod
type :: a
contains
procedur... pawel.biernat1(12)