How to orginise "really" Object in the F90???

From: Arman Khalatyan (arm2arm_at_thsun1.jinr.ru)
Date: 05/28/04


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.



Relevant Pages

  • Re: inhibit compiler warning C4624 for a class hierarchy
    ... I'd really like to just pretend that the dynamic type is the base class. ... ** Carries a request or notification and any associated parameters. ... static void* operator new ... struct PNPEXPORT IConcurrentOperations::OpNotification abstract: public ...
    (microsoft.public.vc.language)
  • Re: Hooking automation object Events
    ... The next few lines of my post show the procedure SelectionChange: ... _PowerPCBDocEvents = dispinterface; ... void PowerPCBSink::OnFinalRelease ... // object before calling the base class. ...
    (comp.lang.pascal.delphi.misc)
  • RE: Protected keyword
    ... Only the Employee class internally can see the base class RaiseEvent method. ... public void HoldBreath{ ... a child that inherits from it so as to be able to call the protected method ...
    (microsoft.public.dotnet.languages.csharp)
  • Threads
    ... base class and then at least 2 classes that extends Thread. ... void upDateScreen() ...
    (comp.lang.java.programmer)
  • Type of base pointer
    ... public override void Test() ... base class for B is A not A" ... I have a virtual function called Testin class A. Also i have class B ... As well base object doesn't have method OldTest(). ...
    (microsoft.public.dotnet.framework)