comp.lang.fortran
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.fortran Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Subroutine header         


Author: Stefan
Date: May 11, 2008 14:58

When writing programs/subroutines I usually give them 'header' like
this:

PROGRAM/SUBROUTINE EXAMPLE(a,b,...)
! Version: 1.01 Last modified: 11.01.2001.
! Parameters: a - first parameter
b - second -||-
! Calling: list of subroutines it calles, if any ...
! Part of: if part of a greater program (exclusivly)
! Compiled and tested with: CVF66c
! Modifications:
! - version number / date:
! short description of modification

Do you have a similar habit and what do you include in those headers?
How do you organize larger programs and determine what a certain
subroutine does after not looking at it for a while ?

Stefan
2 Comments
  ISO_C_BINDING and BLAS/LAPACK         


Author: Jason Nielsen
Date: May 11, 2008 12:55

Does anyone know of iso_c_binding module(s) to allow blas and lapack to be
called from C? I am aware of cblas etc. but it seems that given the C
interface has become standard that something along these lines may have
been written. My google search seems to indicate that such a thing does
not exist but I was curious.

Thanks,
Jason
1 Comment
  ISO 10646 support         


Author: FX
Date: May 11, 2008 11:53

Hi there,

I asked the question some time ago, but got no answer: is there any
compiler out there that handles ISO-10646 character variables? I.e. is
there any compiler that will compile this:

character(len=10, kind=selected_char_kind('ISO_10646')) :: line
line = selected_char_kind('ISO_10646')_"whatever"

I assumed so because several compilers have "Yes" in the "Support
international character sets" (quoting from memory) category of the F2003
compiler comparison published in ACM SIGPLAN Fortran forum, but the ones
I tried it with (Intel, Sun, g95) don't support the UCS-4 charset.
Furthermore, I've checked the websites of compilers that are reportedly
winning the Fortran 2003 race (namely, IBM and NAG), and it doesn't look
like they do.

So, can any Enlighten me on that issue? Thanks in advance!

--
FX
3 Comments
  derived type as argument         


Author: GeoGarfield
Date: May 11, 2008 11:20

hi,
I have been asking myself this question for a long time, and there's
nobody around me at work who knows anything about programming, so
there it is.

I very much like derived types. I use them all the time. In the
derived type ptcl I have three unallocated arrays x,y and z. In the
main I create the variable ptcles of type ptcl. I would like to pass
ptcles as argument to a routine called gnagna that would allocate the
arrays ptcles%%x, ptcles%%y, and ptcles%%z.

Here is the code. When I compile it with the PGI compiler on a Cray,
it works. I first get F F F , then T T T.
Beyond the practical aspect, I would like to know whether I am lucky,
or whether all F90 compilers on all machines will accept it.

--------------------------------------------------------------------------------------------
module opla
type ptcl
double precision, dimension(:), pointer :: x,y,z
end type
end module
Show full article (1.36Kb)
4 Comments