How to orginise "really" Object in the F90???
From: Arman Khalatyan (arm2arm_at_thsun1.jinr.ru)
Date: 05/28/04
- Next message: Gerry Thomas: "Re: Setting priority for exe built in DFf6.6"
- Previous message: Gerry Thomas: "Re: sin of large x, redux"
- Next in thread: Helge Avlesen: "Re: How to orginise "really" Object in the F90???"
- Reply: Helge Avlesen: "Re: How to orginise "really" Object in the F90???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 May 2004 09:19:28 -0700
Hello!
Question:
How to make a base class with initialisations and interfeces in such a way:
In C++ I can do:
class MyClass::public MaybeBaseClass
{
void dosomething();
void definit();
MyClass(){OpenDefFile();init(m_file);};//constructor by default
MyClass(FILE *f1){init(f1);}
}
...
//somwere in main
MyClass obj1;
MyClass obj2(InFile);
obj1.m_loc_var=12;
obj2.m_loc_var=4;
//This lines important
// The objects should run in same time
ThrId1 = RunThread(obj1);
ThrId2 = RunThread(obj2);
}
Is there in F90 analog?
With modules I wroted:
moduls MyClass
use MaybeBaseClass
character(50) :: InFileName
real :: m_loc_var;
contains
subroutine init
//init some stuff
end
end MyClass
//in main
program RunME
use MyClass
????????????What else??
ThrID1=RunThred(??)
ThrID2=RunThred(??)
end
Please help me, to imagine the power of fortran90
Thanks beforehand.
Cheers Arman.
PS
I am a C++ user, but thigs are putted me in the another side of programming barier.
- Next message: Gerry Thomas: "Re: Setting priority for exe built in DFf6.6"
- Previous message: Gerry Thomas: "Re: sin of large x, redux"
- Next in thread: Helge Avlesen: "Re: How to orginise "really" Object in the F90???"
- Reply: Helge Avlesen: "Re: How to orginise "really" Object in the F90???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|