[comp.lang.fortran] Help: MS-DOS FORTRAN

lee@ohstpy.mps.ohio-state.edu (06/26/91)

Hello, folks!
I need help from Fortran experts.
Recently, I got MS-DOS FORTRAN V5.1(V5.0?) for IBM-PC without any 
manual, so I have to figure out how I can run a program originally 
used for VAX FORTRAN.  

The Following program is just a test program that contains all the
informations that I want to know their corresponding statements or
intrinsic functions. Any suggestions or partial answers will be greatly
appreciated.  Please send messages to my e-mail address or post
your comments. Thank you in advance.

     Ki Ho Lee
    (bitnet)     LEE@OHSTPY
    (internet)   LEE@OHSTPY.MPS.OHIO-STATE.EDU
    (internet)   LEE@PACIFIC.MPS.OHIO-STATE.EDU
C
CC    ---------- BEGINNIG OF PROGRAM TEST --------------------------
C
      PROGRAM TEST
      CHARACTER*1   ANS
      CHARACTER*10  CDATE,CTIME,SSS
      CHARACTER*20  CDATIM
C
C     (Question #1) Do OPEN, CLOSE, REWIND work in MS-DOS Fortran ?
C
      OPEN(UNIT=9,FILE='TEST.OUT',STATUS='NEW')
      WRITE(6,*) 'Open statement works!'
      WRITE(9,*) 'Open statement works!'
      CLOSE(9)
      WRITE(6,*)
      WRITE(6,'('' Hit <RT>   '',$)')
      READ(5,'(A1)') ANS
C
C     (Question #2) How can I clean the screen ?
C
      WRITE(6,*) CHAR(27),'[1;1f',CHAR(27),'[J'
      WRITE(6,*) ' *** THE FIRST LINE OF THE SCREEN **********'
      WRITE(6,*) ' *** THE SECOND LINE   *********************'
      WRITE(6,*) ' *** THE THIRD LINE    *********************'
      WRITE(6,*) ' *******************************************'
      WRITE(6,*) CHAR(27),'[10;75f',CHAR(27),'[J'
      WRITE(6,*) ' *** THE 10th LINE **********'
      WRITE(6,*)
      WRITE(6,'('' Hit <RT>   '',$)')
      READ(5,'(A1)') ANS
C
C     (Question #3) Is there any same function like SPAWN ?
C
      WRITE(6,*) 'Rename an existing file to another name.'
      WRITE(6,*) 'Wait for a moment.'
      WRITE(6,*)
      CALL LIB$SPAWN('RENAME  TEST.OUT  TEST.DAT')
      WRITE(6,*)
      WRITE(6,'('' Hit <RT>   '',$)')
      READ(5,'(A1)') ANS
C
C     (Question #4) How can I exit to DOS for a moment without
C                   terminating this program ?
C
      WRITE(6,*)
      WRITE(6,*) 'Gate to "$$ " temporarily'
      WRITE(6,*) 'Use "LOGOUT" to return to the program.'
      WRITE(6,*) 'Wait for a moment.'
      WRITE(6,*)
      CALL LIB$SPAWN('SPAWN/PROMPT="$$ "/NOLOG ')
C
C     (Question #5) How can I get today's date and current time ?
C                   Are the format like 25-JUN-91 and 12:30:10 ?
C
      CALL DATE(CDATE)
      CALL TIME(CTIME)
      WRITE(6,'('' Today        is  '',A10)') CDATE
      WRITE(6,'('' Current time is  '',A10)') CTIME
C
C     (Question #6) Is there the same intrinsic function INDEX ?
C
      SSS='123$789'
      I=INDEX(SSS,'$')
      WRITE(6,*)
      WRITE(6,'(1X,A10,I10)') SSS,I
C
C     (Question #7) How can I put together two character variables ?
C
      CDATIM=CDATE//CTIME
      WRITE(6,'(1X,A20)') CDATIM
      WRITE(6,*)
C      
      STOP
      END
C
CC    ---------- END OF PROGRAM TEST ---------------------------------
C
(Question #8) How can I compile and link the above program ?
              ( What are the commands for FORTRAN and LINK ?
                Is there any option to get a list file ?    )
(Question *9) What is the maximum dimension of an array ?
              (I guess it depends on the size of RAM. I forgot
               the capacity of my machine. Let's assume that
               I have 1 Mbytes.)

---KHL

sun@me.utoronto.ca (Andy Sun) (06/26/91)

lee@ohstpy.mps.ohio-state.edu writes:

>Hello, folks!
>I need help from Fortran experts.
>Recently, I got MS-DOS FORTRAN V5.1(V5.0?) for IBM-PC without any 
>manual, so I have to figure out how I can run a program originally 
>used for VAX FORTRAN.  

>C     (Question #1) Do OPEN, CLOSE, REWIND work in MS-DOS Fortran ?

Yes. They are, I think, standard Fortran 77 functions.

>C     (Question #2) How can I clean the screen ?

ANSI escape sequence will work, but you'll have to have the ANSI or
equivalent driver installed. There is a graphics command in MS Fortran 5.0
that will clear the screen in both text and graphics mode.

>C     (Question #3) Is there any same function like SPAWN ?

There is an interface to C library routine in MS Fortran that will do spawn.

>C     (Question #4) How can I exit to DOS for a moment without
>C                   terminating this program ?

There is an interface to C library routine in MS Fortran that will do a shell
escape to DOS.

>C     (Question #5) How can I get today's date and current time ?
>C                   Are the format like 25-JUN-91 and 12:30:10 ?

There are built-in date and time functions in MS Fortran 5.0.

>C     (Question #6) Is there the same intrinsic function INDEX ?

No sure about this one.

>C     (Question #7) How can I put together two character variables ?

There are a few ways to do it. Better to pick a way that's independent of
the compiler you use. One way is to write two strings to a single string
variable, instead of to device 6.

>(Question #8) How can I compile and link the above program ?
>              ( What are the commands for FORTRAN and LINK ?
>                Is there any option to get a list file ?    )

The very first thing to do is to build your own library. Then you can
start talking about compile and link.

>(Question *9) What is the maximum dimension of an array ?
>              (I guess it depends on the size of RAM. I forgot
>               the capacity of my machine. Let's assume that
>               I have 1 Mbytes.)

It depends on several things, like single and double precision, 2-byte
or 4-byte integer arrays, etc. Best to go by trial and error.

One first piece of advice:

Do NOT pirate software! Buy it and get your own manuals! And if you really
like pirating, don't advertise it on the net and tell the world that you
are pirating software.

Andy

_______________________________________________________________________________
Andy Sun                            | Internet: sun@me.utoronto.ca
University of Toronto, Canada       | UUCP    : ...!utai!me!sun
Dept. of Mechanical Engineering     | BITNET  : sun@me.toronto.BITNET

userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) (06/26/91)

In article <10328.286746c7@ohstpy.mps.ohio-state.edu>, lee@ohstpy.mps.ohio-state.edu writes:
>Hello, folks!
>I need help from Fortran experts.
>Recently, I got MS-DOS FORTRAN V5.1(V5.0?) for IBM-PC without any 
>manual, so I have to figure out how I can run a program originally 
>used for VAX FORTRAN. 
 
You may also need help from legal experts. If you do not have the
manual or the original diskettes (which should indicate the
version as either 5.0 or 5.1) you are likely using the software
illegally. In addition, your copy may be incomplete, improperly
installed, contain mixed version files, and/or contain vandalware
(i.e. a virus). If your needs are great enough to risk these flaws,
aren't they great enough to support the purchase of a legal copy? 
 
> 
>The Following program is just a test program that contains all the
>informations that I want to know their corresponding statements or
>intrinsic functions. Any suggestions or partial answers will be greatly
>appreciated.  Please send messages to my e-mail address or post
>your comments. Thank you in advance.
> 
>     Ki Ho Lee
>    (bitnet)     LEE@OHSTPY
>    (internet)   LEE@OHSTPY.MPS.OHIO-STATE.EDU
>    (internet)   LEE@PACIFIC.MPS.OHIO-STATE.EDU
>C
>CC    ---------- BEGINNIG OF PROGRAM TEST --------------------------
 
 -------------------+-------------------------------------------
 Al Dunbar          | 
 Edmonton, Alberta  |  Disclaimer: "not much better than
 CANADA             |                  datclaimer"    
 -------------------+-------------------------------------------

silvert@cs.dal.ca (Bill Silvert) (06/26/91)

In article <10328.286746c7@ohstpy.mps.ohio-state.edu> lee@ohstpy.mps.ohio-state.edu writes:
>Recently, I got MS-DOS FORTRAN V5.1(V5.0?) for IBM-PC without any 
>manual, so I have to figure out how I can run a program originally 
>used for VAX FORTRAN.  

If you bought a copy without a manual, contact your dealer or Microsoft
for a replacement.  If you have a pirated version, please do not ask for
help over Usenet.  It implies that we support piracy, and it puts those
of us who pay good money for the software we use in a compromising position.
-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biome!silvert
BITNET=silvert%biome%dalcs@dalac	InterNet=silvert%biome@cs.dal.ca

lsmith@unssun.nevada.edu (The Master) (06/27/91)

 Suppose I buy a used computer, and the hard disk is loaded with
software. W.P., Lotus, DB4, all the goodies... The original owner
bought the software and a license to install it on his computer.
So the software is legal, right? Now he sells the computer. Does
the software license transfer along with the computer and software,
or does it stay with the original owner, who kept the floppies but
does not now have a computer?


 POSTED FROM THE GREAT STATE OF NEVADA                                          
================================================================================
+Where men are MEN....                reply to: lsmith@unssun.nevada.edu
+And sheep are nervous.

silvert@cs.dal.ca (Bill Silvert) (06/27/91)

In article <677@equinox.unr.edu> lsmith@unssun.UUCP (The Master) writes:
>
> Suppose I buy a used computer, and the hard disk is loaded with
>software. W.P., Lotus, DB4, all the goodies... The original owner
>bought the software and a license to install it on his computer.
>So the software is legal, right? Now he sells the computer. Does
>the software license transfer along with the computer and software,
>or does it stay with the original owner, who kept the floppies but
>does not now have a computer?

If he doesn't sell you the software he still owns it.  He can install it
on another computer, or sell it to someone else.

> POSTED FROM THE GREAT STATE OF NEVADA                                          
That is a good oxymoron.


-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biome!silvert
BITNET=silvert%biome%dalcs@dalac	InterNet=silvert%biome@cs.dal.ca

sun@me.utoronto.ca (Andy Sun) (06/27/91)

lsmith@unssun.nevada.edu (The Master) writes:


> Suppose I buy a used computer, and the hard disk is loaded with
>software. W.P., Lotus, DB4, all the goodies... The original owner
>bought the software and a license to install it on his computer.
>So the software is legal, right? Now he sells the computer. Does
>the software license transfer along with the computer and software,
>or does it stay with the original owner, who kept the floppies but
>does not now have a computer?


> POSTED FROM THE GREAT STATE OF NEVADA                                          
>================================================================================
>+Where men are MEN....                reply to: lsmith@unssun.nevada.edu
>+And sheep are nervous.

The software licenses stay with the owner, regardless of whether he/she has
a computer or not (who said one has to have a computer to buy software?).

If he/she is selling the computer without first erasing any license software
in it, strictly speaking, he/she is violating the copyright law. Some software
license are transferrable (i.e. sellable) but I am not sure if all of them are.

Andy

_______________________________________________________________________________
Andy Sun                            | Internet: sun@me.utoronto.ca
University of Toronto, Canada       | UUCP    : ...!utai!me!sun
Dept. of Mechanical Engineering     | BITNET  : sun@me.toronto.BITNET

orville@weyrich.UUCP (Orville R. Weyrich) (06/28/91)

In article <677@equinox.unr.edu> lsmith@unssun.UUCP (The Master) writes:
>
> Suppose I buy a used computer, and the hard disk is loaded with
>software. W.P., Lotus, DB4, all the goodies... The original owner
>bought the software and a license to install it on his computer.
>So the software is legal, right? Now he sells the computer. Does
>the software license transfer along with the computer and software,
>or does it stay with the original owner, who kept the floppies but
>does not now have a computer?

Generalizations are not possible as a rule :-). You have to read the
license agreement for each software product. Also keep in mind that
some software licence agreements are unenforceable (many of the
shrink-wrap agreements). Also keep in mind that a recent isssue of
ComputerWorld has a front-page article about "software police" being
sponsored (it seems) by Lotus and other companies that like to play
legal hard-ball. These "software police" seem to have authority to
descend on a place of business, order everyone to get away from the
computers immediately, and then to make a list of all software loaded
on all hard-drives and demand to see sales receipts. If you can't
produce them, they claim to be able to force you to pay fines and
also to pay full list price for all affected software packages.

Personally, my recommendations are:

	1) If you don't have the distribution disks yourself, you
	   probably are on thin ice.
	2) If you do have the distribution disks, and have software
	   produced by slime-ball companies [you figure out who I mean]
	   but are not the original purchaser, they may use their legal
	   muscle to make your life miserable even though if you had
	   sufficient financial reserves you could likely fight and win.
	3) Therefore, do everything you can to avoid software by these
	   slime-balls. Buy from companies with a good attitude, like
	   Borland. Any time you see articles about companies running
	   around sueing everyone in sight, take note of the companies
	   and add them to your own little list of companies that you
	   do not wish to deal with. [It is my opinion that if a 
	   company really has a good product and service, that they can
	   afford not to be petty, because users in general will
	   be happy to pay for their products. The more petty a company 
	   is, the poorer I suspect their quality and service really are.]

My own little list includes a company selling file compression software,
a hardware/software manufacturer of mouse-based GUI's, a spreadsheet
manufacturer, and a database manufacturer. When I get sales literature
from folks on my little list, I use their prepaid reply envelope to
send them a letter stating that I refuse to use their software/hardware
or to recommend it to clients, or to teach it to my students. I don't
know if it has any effect, but it makes me feel better. Pass it on.

Hope this helps. Disclaimer: I am not a lawyer. If you are really
worried about being sued, you should get your own.



--------------------------------------           ******************************
Orville R. Weyrich, Jr., Ph.D.                   Certified Systems Professional
Internet: orville%weyrich@uunet.uu.net             Weyrich Computer Consulting
Voice:    (602) 391-0821                         POB 5782, Scottsdale, AZ 85261
Fax:      (602) 391-0023                              (Yes! I'm available)
--------------------------------------           ******************************

silvert@cs.dal.ca (Bill Silvert) (06/28/91)

In article <1991Jun28.054732.1424@weyrich.UUCP> orville@weyrich.UUCP (Orville R. Weyrich) writes:
>>So the software is legal, right? Now he sells the computer. Does
>>the software license transfer along with the computer and software,
>>or does it stay with the original owner, who kept the floppies but
>>does not now have a computer?
>
>Generalizations are not possible as a rule :-). You have to read the
>license agreement for each software product. Also keep in mind that
>some software licence agreements are unenforceable (many of the
>shrink-wrap agreements).
>
>Personally, my recommendations are:
>
>	1) If you don't have the distribution disks yourself, you
>	   probably are on thin ice.
>	2) If you do have the distribution disks, and have software
>	   produced by slime-ball companies [you figure out who I mean]
>	   but are not the original purchaser, they may use their legal
>	   muscle to make your life miserable even though if you had
>	   sufficient financial reserves you could likely fight and win.

This is pretty extreme.  In cases where I have heard of action being taken
it is usually a large organization with at most one copy of the software
that everyone uses.  So far as individual users are concerned (and we
are talking compilers, not WP or spreadsheets in this group, right?), I
think the issue is ethics.  When I sell software I turn over the
complete package, disks, manuals, etc., without worrying about whether
the publisher gives me that right.  I run only one copy of the software
at a time, sometimes on different CPU's -- modern licensing agrements
generally accept that, although older ones don't (if your machine goes
into the shop and you get a loaner you are expected to buy new software
-- what nonsense!).

Instead of getting into legal hassles, why not just use software
ethically?  If you have a single-copy license, run just one copy at a
time.  With regard to the original posting, since the seller of your
machine retains the software masters, he/she presumably retains the
right to run the software, so you don't.



-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biome!silvert
BITNET=silvert%biome%dalcs@dalac	InterNet=silvert%biome@cs.dal.ca

ghenniga@hertz.NMSU.Edu (Gary Hennigan) (06/29/91)

>>You may also need help from legal experts. If you do not have the
>>manual or the original diskettes (which should indicate the
>>version as either 5.0 or 5.1) you are likely using the software
>>illegally. In addition, your copy may be incomplete, improperly
>>installed, contain mixed version files, and/or contain vandalware
>>(i.e. a virus). If your needs are great enough to risk these flaws,
>>aren't they great enough to support the purchase of a legal copy? 

ENOUGH ALREADY!!!! There are other reasons why a person may not have a set
of manuals for software and destroying his character on the net, as
opposed to at least showing some restraint and emailing the guy, is
RIDICULOUS.
	There are at least two good reasons why a person may not have a
set of manuals for software:
	1) This guy appears to need to know if his code, which he may have
much time and effort invested in, will run with MS FORTRAN. I don't know
about you but I for one am not going to pay $350 dollars for a product
only to find out it doesn't have the capabilities I'm looking for.
	2) The most probable and understandable reason is that maybe he's
using the compiler at a site which holds a site license for the product.
Have you ever seen a company that gives you a set of manuals (without
extra cost) for each machine you're running on when you purchase a site
license!!! For instance, here at the university we have a site license for
many products, including several MS ones, does this mean that every student
gets a set of manuals for the products; if so I'd like to go to that
university!!! I have yet to see any of these PC's with a set of manuals
next to them for all the products we have licensed!!! In fact I was told
that there is only one set of documentation for each of the products and
that the head of my department or our Engineer/Tech has the documentation
and these people rarely have the time or the inclination run library
services for the stuff!

	So I guess the point is to not point a finger at the guy in front
of, literally, the whole world without at least giving him a chance to
explain/defend his actions. He posted to the net for help and got nothing
but flack(sp?), not exactly the purpose of this group or the net as a
whole, IMHO.

--
Gary Hennigan
+---------------------------------------------------------------------------+
+  e-mail: ghenniga@NMSU.Edu, henninsf@maxwel.NMSU.Edu                      +
+  Electrical Engineering; PhD Student, Computational Electromagnetics      +
+  Opinons are my own, after all I'm still just a student!                  +
+---------------------------------------------------------------------------+

userRPCP@mts.ucs.UAlberta.CA (Junior Physicist) (06/30/91)

In article <677@equinox.unr.edu>, lsmith@unssun.nevada.edu (The Master) writes:
> 
> Suppose I buy a used computer, and the hard disk is loaded with
>software. W.P., Lotus, DB4, all the goodies... The original owner
>bought the software and a license to install it on his computer.
>So the software is legal, right? Now he sells the computer. Does
>the software license transfer along with the computer and software,
>or does it stay with the original owner, who kept the floppies but
>does not now have a computer?
> 
 From what I know of software licenses, as long as the original
disks and the documentation are transferred with the computer,
the software license goes along with it.  It seems to me that
the software license stays with the original disks.  Any 
comments from others more in the know on this than me?  I'm hardly
a reader of software licenses.
Eugene Mah, Junior Physicist
 
INTERNET: userRPCP@mts.ucs.ualberta.ca
BITNET: userRPCP@ualtamts