Re: Whoever loves C++ and java programming, come here

From: Phil... (rynes_at_ieee.org)
Date: 10/25/03


Date: Sat, 25 Oct 2003 21:59:18 GMT

I don't know about C++ to FORTRAN, but I may have
been too hasty about the FORTRAN to java. I found this site
http://netlib.bell-labs.com/netlib/java/index.html
that claims to have a directory of stuff for "FORTRAN to java" but
I just checked it out and it seems to be just stuff for the math library.
I believe they do have a translator, but I have not found it.

"Angela K" <crxgurl@shaw.ca> wrote in message
news:gxBmb.178505$pl3.11349@pd7tw3no...
> where would i find a C++ to fortran and a fortran to java convertor? I
> searched google and couldnt find anything.
>
> "Phil..." <rynes@ieee.org> wrote in message
> news:tsAmb.25756$Fm2.12789@attbi_s04...
> > There is a fortran to java translator so if you
> > convert your program to fortran it is a snap.
> >
> >
> > "Angela K" <crxgurl@shaw.ca> wrote in message
> > news:W5Amb.177648$6C4.69738@pd7tw1no...
> > > I need to translate this code into java, can anyone do it?
> > >
> > > #include <iostream.h>
> > >
> > > #include "LinkedList.h"
> > >
> > > #include "mystring.h"
> > >
> > >
> > >
> > > template <class Object>
> > >
> > > void printList(const List<Object> & theList) {
> > >
> > > if(theList.isEmpty())
> > >
> > > cout << "The List is Empty, Dude!!" << endl;
> > >
> > > else {
> > >
> > > ListItr<Object> itr = theList.first();
> > >
> > > for( ; !itr.isPastEnd(); itr.advance())
> > >
> > > cout << itr.retrieve() << " ";
> > >
> > > } //printing list in else statement
> > >
> > > cout << endl;
> > >
> > > } // print list
> > >
> > >
> > >
> > > int main() {
> > >
> > > string x;
> > >
> > > List<string> myList;
> > >
> > > ListItr<string> theItr = myList.zeroth();
> > >
> > > int i = 0;
> > >
> > >
> > >
> > > printList(myList);
> > >
> > >
> > >
> > > cout << "Enter string values, seperated by whitespace." << endl;
> > >
> > > cout << "ctrl-d by itself on a line will terminate the process." <<
> > endl;
> > >
> > > cout << "Watch the List Building Up in Progress!!" << endl;
> > >
> > >
> > >
> > > while (cin >> x) {
> > >
> > > myList.insert(x, theItr);
> > >
> > > printList(myList);
> > >
> > > theItr.advance();
> > >
> > > i++;
> > >
> > > }
> > >
> > >
> > >
> > > cout << endl;
> > >
> > > cout << "Traverse the Entire List.Remove the names(nodes) that
begin
> > with
> > >
> > > the character" << endl;
> > >
> > > cout << "\"a\"" << endl;
> > >
> > > cout << "Watch the List Shrinkage in Progress!!" << endl;
> > >
> > > cout << endl;
> > >
> > >
> > >
> > > string y;
> > >
> > > string a = "a";
> > >
> > >
> > >
> > > ListItr<string> tItr = myList.first();
> > >
> > > for( ; !tItr.isPastEnd(); tItr.advance()) {
> > >
> > > y = tItr.retrieve();
> > >
> > > if(y[0] == a[0]) {
> > >
> > > myList.remove(y);
> > >
> > > printList(myList);
> > >
> > > }
> > >
> > > }
> > >
> > >
> > >
> > > return 0;
> > >
> > > } //main
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Comments from those devleoping niche software.
    ... I've written Fortran 95 programs ... > but very user-friendly analysis packages. ... > best of my knowledge as a bridge engineer) don't exist in any other ... Java would provide the business logic and front end. ...
    (comp.programming)
  • Re: Is Fortran more accurate than Java ?
    ... Fortran is far more portable ... >> than Java since it doesn't specify a detailed arithmetic model. ... Portability has a variety of shadings. ... There are still plenty of machines for which it is a problem but they ...
    (comp.lang.java.programmer)
  • Re: seeking advice for "translate" Fortran code to Java code
    ... redefine a common block as needed for each subroutine. ... Still, Java has no pointers, so I ... Java arrays are always what C would call arrays of pointers ... Fortran intrinsics in Java appropriately. ...
    (comp.lang.fortran)
  • Re: PL/I, COBOL, Advantages, Equivalence, et al
    ... But why Fortran and not Ada or Java? ... Java is simply not sufficiently powerful for number-crunching. ... The language requires so much ...
    (comp.lang.pl1)
  • Re: The Complexity of Software
    ... >that shows that Fortran code is simpler than Java? ... language without dynamic memory allocation. ...
    (comp.object)