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.