Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Fortran for DOS documentation...

Status
Not open for further replies.

pmb55

Programmer
Mar 29, 2004
14
US
Greetings All!!!

I'm doing a project where I am converting MSFortran for DOS (16bit) to Visual Basic. Does anyone know where I can find a reference manual for this flavor of Fortran? I have the Watcom documentation, but it is far from 100%. Any assistance would be greatly appreciated.

Philip
 
If you have the full MS fortran installation,
Code:
set HELPFILES=wherever the help lives
Then type help in DOS. The documentation lives in .hlp files that come with the installation.
 
Sorry - forgot to add that the command for summoning help is QH
 
Thanks for the reply. What I forgot to mention is that all I have to work with is the original source code. No compiler (and its documentation) is available to me.

PMB
 
What sort of information are you looking for? Is it basic Fortran stuff or Windows interfaces?

Windows interfaces are the same as those in C. If you just look up the calls in MSDN for C, it will be the same. Things like setcolor etc can be found on MSDN.

The 16bit version is basically Fortran77 so any documentation on Fortran77 should suffice.

The only departure from standard F77 is that

Input channel 5 is keyboard input.
Output channel 6 is screen output.
 
It is basic syntax stuff. I have not done anything with fortran since 1977, and that was a college class. I have the Watcon Fortran 77 tools, but there appears to be some statements in the source that I cannot find in the documentation. For example:

pvar(mm:mm)=var(j)

Is the (mm:mm) identifying a starting relative position and length within the value pvar or is it the starting and ending position?

I know that this is junior league stuff, but I'm trying.

pmb
 
No problem: perl still looks foreign to me after 15 years of using it off and on.

If you look up characters and strings, it will tell you more. It is what used to be called 'slicing' in the late 70s. Nowadays slicing means something completely different. Say you have 2 character strings
Code:
CHARACTER*6 six
CHARACTER*3 three

three = 'end'
If I wish to get a 3 character string into positions 1 to 3 of six
Code:
six(1:3) = 'leg'
If I wish to copy from three to six, starting at position 4
Code:
six(4:6) = three
! I should now get legend
print *, six
There are also variants like

six:)4) ! lege = VB left(six,4)
six(3:) ! gend = VB mid (six,3)
six:)) ! legend - some people will code like this
// ! = VB &

With languages with proper string manipulation, you can actually remove whole chunks of string manipluation code where they convert from one from to another. It is basically to do with storage but it is very implemetation dependent
Code:
CHARACTER*1 waste(8)   ! can take 8 words
CHARACTER*4 packed(2)  ! on a 32/64 bit machine 4 words
CHARACTER*16 compact   ! on a 64 bit machine, 1 word
The problem is that with word based machines, handling things like compact(2:5) can be very inefficient as it involves a lot of shifting and masking. It doesn't make any difference at all on an X86 architecture.
 
xwb;

Thank you very much! This gives me a clearer understanding on where I need to go with this.

PMB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top