LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2009, 09:07 AM   #1
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 270

Rep: Reputation: 20
Question vectors in fortran90


Dear all,

I'm not an expert of Fortran 90.
I'm wondering how to perform such kind of thing :

Code:
(/l,m,n/) = matmul(mat,(/1.,2.,1./)) (doesn't work)
where mat is a well defined array.

I just want tot avoid the creation of a vector results

Code:
res = matmul(mat,(/1.,2.,1./)) (works, of course)
Any idea?

Eric.
 
Old 04-24-2009, 11:36 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

What's wrong with the good old-fashioned FORTRAN IV technique of declaring a function with three arguments: the two arrays you're multiplying, and a third array to hold the product?
 
Old 04-25-2009, 06:53 AM   #3
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 270

Original Poster
Rep: Reputation: 20
Thumbs up

Hi,

you're right, I can do that.
Thanks!,

Eric.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to get Fortran90 compiler nelufarup Linux - Software 17 02-19-2009 03:46 AM
C++ vectors and ifstream Jayfrin Programming 5 04-23-2008 03:39 PM
fortran90 kostis Programming 3 11-06-2006 02:12 PM
Vectors in C++! Hady Programming 1 04-13-2004 08:05 AM
Vectors in C++ sabeel Programming 2 11-23-2003 12:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration