Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Fortran and Python (was Re: Statement function host association)
James Giles wrote:

> The problem with that is I would prefer that statement functions
> be inherently generic.  That is, the return type of the statement
> function should be the result type (rank, KIND) of the expression
> that defines it based on the types (ranks, KINDs) of the actual
> arguments to the function.

Are trying to sneak Python into Fortran? :) Python does not have
declarations, and I think functions in Python have the property you
described.

Some features in Python (and in some other languages) that are
introduced in Fortran 2003 (in a different form) are

(1) classes with inheritance
(2) procedures taking allocatable arrays as arguments and returned
values (F95 already allows pointer arguments)
(3) automatic allocation of arrays in an expression

(my understanding is that if x has known dimensions, and y has not been
allocated yet, and x and y have the same rank, then the statement

y = x

both allocates y and sets its elements equal to those of x)

(5) allocatable structure components
(6) interoperability with C

I think features (2) and (3), along with the array operations and
intrinsic function present since Fortran 90, are giving Fortran some of
the features of a high-level scientific scripting language (similar to
Python with Numarray, or Matlab/Octave/Scilab, or IDL, or R/S-Plus),
which is a good thing IMO, as long as users still get good performance
and stand-alone executables. Getting non-Fortran-95 programmers to
think of the language this way is difficult.


Report this thread to moderator Post Follow-up to this message
Old Post
beliavsky@aol.com
05-19-05 09:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:58 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.