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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to assign a value to a complex variable 1

Status
Not open for further replies.

rock31

Programmer
Jul 18, 2004
38
US
As title, how to assign a complex value to a variable declared as complex, for example,

COMPLEX C

C=?

THANKS
 
Code:
program main
   complex c
   c = cmplx(10.0, 20.0)
   print *, 'real ', real(c), '  imaginary ', aimag(c)
   stop
end program
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top