Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass a non standard data type to a function

Status
Not open for further replies.

QuadVODE

Programmer
Jun 9, 2010
2
DE
Hi,

I'm using a library (qd) which allows me to calculated in quadropole precission.

When I pass the quadrupole variable zdum to the function
cabs1

use qdmodule
implicit none
type (qd_complex) dzum
type (qd_real) cabs1(zdum)

I get the following errror message:

fortcom: Error: zgbfa.f, line 102: A REAL or INTEGER or LOGICAL data type is required in this context. [ZDUM]
type (qd_real) cabs1(zdum)
---------------------------^
fortcom: Error: zgbfa.f, line 153: A REAL or INTEGER or LOGICAL data type is required in this context. [ABD]
if (cabs1(abd(l,k)) .eq. 0.0d0) go to 100
-------------------^
.
.
.
.
What means, how far I can see, I can pass only 'intrinsic' datatypes as arguments for functions!

Does anybody knows a solution? Or has a guess??

Thanks

Peter
 
Ok,

I solved it.

type (qd_real) cabs1

works.

But why???

Cheers

Peter
 
It looks like maybe a simple typo: You didn;t declare zdum. did you want dzum or zdum?

A REAL or INTEGER or LOGICAL data type is required in this context
it means you can only dimension the array with those types.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top