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

graphics and bounds
hi there,
I'm a long-time fan of linux f77 and have two queries (3 actually) :
1- is there anyway to produces graphics apart from making a system call to
some external prog like gnuplot or xmgr ?
2 - are there compiling options to produces arrays bound checks ? are these
reliable ?
3 - if f77 compiles, links and produces and executable, what is a makefile
for ??
thanks :) !
G.

Report this thread to moderator Post Follow-up to this message
Old Post
rafat@caramail.com
12-21-04 08:59 PM


RE: graphics and bounds
In a previous article, rafat@caramail.com wrote:
>hi there,
>I'm a long-time fan of linux f77 and have two queries (3 actually) :
>1- is there anyway to produces graphics apart from making a system call to
>some external prog like gnuplot or xmgr ?
>2 - are there compiling options to produces arrays bound checks ? are these
>reliable ?
>3 - if f77 compiles, links and produces and executable, what is a makefile
>for ??
>thanks :) !
>G.
1. You need a graphics program written in F77 - one way is to
write your own. The easiest o/p (IMO) is .bmp.
Better if someone has written one and is willing to share.
But this is likely compiler dependent because bit manipulation
functionality varies between compilers.


Chris

Report this thread to moderator Post Follow-up to this message
Old Post
meek@skyway.usask.ca
12-21-04 08:59 PM


Re: graphics and bounds
rafat@caramail.com wrote:
> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :

> 1- is there anyway to produces graphics apart from making a system call to
> some external prog like gnuplot or xmgr ?

http://groups.yahoo.com/group/flumech/message/57

The gnuplotfortran, fortranposix packages written by Madhusudhan singh
is the perfect solution for your problem. They use fortran 90 syntax but
since fortran 90 compiler can compile a f77 code, there should not any
problems if you have access to a fortran 90 compiler.

There are 3 free fortran 90 compilers available.

1) gfortran
2) g95
3) intel fortran compiler for non commercial purposes

Search google for more information.

> 2 - are there compiling options to produces arrays bound checks ? are thes
e
> reliable ?

Most compilers have them. For example, in intel compiler the option is
called -C

For more info see man page of your compiler.

> 3 - if f77 compiles, links and produces and executable, what is a makefile
> for ??

That is good if all the source code is in one file. But imagine the
situation of source code distributed over 100 files (not an
exaggeration, I work with such codes).

Let's say file23 depends on file25 and file file72 with no other
dependencies among other files.

When the source code in file25 changes, ideally you need to compile only
file25, file23 and link the two new object files with the 98 old object
files. Make can take care of all this with just one command.

If you are using the usual (f77) command, you will be compiling all the
100 files and that is a waste of resources and time.

Make is a wonderful thing and I strongly suggest you to read the make
documentation. It can be found at

http://www.gnu.org/software/make/manual/make.html

> thanks :) !
> G.
you are welcome. In future when asking for help, please include your
operating system. That would help us to help you in a better way. As you
mentioned gnuplot and make, I assumed you are using linux. Sorry if I am
wrong.

raju

Report this thread to moderator Post Follow-up to this message
Old Post
Kamaraju Kusumanchi
12-21-04 08:59 PM


Re: graphics and bounds
rafat@caramail.com wrote:
> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system call to
> some external prog like gnuplot or xmgr ?

No. The same restriction applies to many languages; for instance, C (and
hence gcc) has no built-graphics support.

> 2 - are there compiling options to produces arrays bound checks ? are thes
e
> reliable ?

Yes -- use the compilation switch "-C" (check bounds). This is very
reliable, but it tends to slow down execution a lot, so don't use it for
production code. Also, be warned that it won't detect incorrect
subroutine arguments, which is a major cause of crashes along side
array-bounds violations.

> 3 - if f77 compiles, links and produces and executable, what is a makefile
> for ??

To specify the order in which files need to be compiled. Also, to
recompile only those parts of a program that have changed.

cheers,

Rich

--
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware

[ Delete VOID for valid email address ]

Report this thread to moderator Post Follow-up to this message
Old Post
Rich Townsend
12-21-04 08:59 PM


Re: graphics and bounds
Rich Townsend wrote:
 
makefile 

>To specify the order in which files need to be compiled. Also, to
recompile only those parts of a program that >have changed.

I believe that the source files of a Fortran 77 program can generally
be compiled in any order. There are no module dependencies to worry
about, as in Fortran 90/95. I think your second reason for using make
files is more important. Also, a makefile can serve as documentation of
how to compile a program.


Report this thread to moderator Post Follow-up to this message
Old Post
beliavsky@aol.com
12-21-04 08:59 PM


Re: graphics and bounds
> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system
call to
> some external prog like gnuplot or xmgr ?

<SNIP>

Maybe the thread "creating graphs in postscript format from Fortran" in
this newsgroup from about 1 year ago will be helpful -- you can find it
using Google Groups. Most of the libraries described there work with
Fortran 77 compilers.


Report this thread to moderator Post Follow-up to this message
Old Post
beliavsky@aol.com
12-22-04 01:57 AM


Re: graphics and bounds
rafat@caramail.com wrote:

> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system call to
> some external prog like gnuplot or xmgr ?

For gnuplot, you could use my gnuplotfortran library (depends on
fortranposix - also available under LGPL). Works only for *nix like
systems, tested on Linux and Sun.

Check out :

http://gnuplotfortran.sourceforge.net

Uses f95 syntax, but you can always profit from updating to the current
decade :)

xmgr ? I do not know, but I am partial to gnuplot as it is a lot more
powerful.

> 2 - are there compiling options to produces arrays bound checks ? are
> these reliable ?

-CB for ifc, for others check the man pages.

> 3 - if f77 compiles, links and produces and executable, what is a makefile
> for ??

To handle multifile programs and dependencies, especially useful if your
source code is written in more than one language.

Report this thread to moderator Post Follow-up to this message
Old Post
Madhusudan Singh
12-22-04 08:57 AM


Re: graphics and bounds
m@skyway.usask.ca wrote:
> In a previous article, rafat@caramail.com wrote:
> 
>
>  1. You need a graphics program written in F77 - one way is to
> write your own. The easiest o/p (IMO) is .bmp.
> Better if someone has written one and is willing to share.
> But this is likely compiler dependent because bit manipulation
> functionality varies between compilers.
>
>
> Chris

You can interface with the Tk library (although that is for f90) -
checkout http://wiki.tcl.tk/4004

Simon

Report this thread to moderator Post Follow-up to this message
Old Post
Simon Geard
04-27-05 01:58 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 07:56 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.