[S] Fortran and Splus

W_ROLKE@rumac.upr.clu.edu
Tue, 4 Aug 1998 11:59:32 -0400


Hi,

I am just learning to write fortran code to be called
from Splus. I have written a little test program, mysort.for,
and I am trying to compile it with COMPILE as described in the
Cfortran.pdf document, p.45 ff, from MathSoft. I have Watcom
Fortran77 Ver. 11.
When I run COMPILE mysort.for in the D:\Splus45\cmd\ directory,
I get the error message "SHOME environment variable is not set"
although, as the autoexec.bat below shows, it is in fact set.
Btw, "D" is a partition on my HDD.

Any ideas as to what is causing this?

Thanks for you help

Wolfgang

P.S. Does anybody have a document descibing how to make
dll's with Watcom that can be called within Splus? I just
got the Watcom Fortran77 compiler and its documentation
sets a new record in brevity (== is totally useless)

*******************************************************
Autoexec.bat:

(some stuff)
SET SHOME = D:\Splus45
SET S_TEMP = C:\atemp\temp
PATH D:\MICROS~1\WORD\OFFICE;C:\PROGRA~1\NORTON~1;%path%;D:\WATCOM\BINNT;D:\WATCOM\BINW
SET PATH=%PATH%;C:\WINDOWS\Twain_32\Scanwiz;C:\WINDOWS\Twain\Scanwiz;D:\WATCOM\NINNT;D:\WATCOM\BINW
SET INCLUDE=D:\WATCOM\H;D:\WATCOM\MFC\INCLUDE;D:\WATCOM\H\NT
SET WATCOM=D:\WATCOM
SET EDPATH=D:\WATCOM\EDDAT
SET FINCLUDE=D:\WATCOM\SRC\FORTRAN\WIN;D:\WATCOM\SRC\FORTRAN

********************************************************
mysort.for:
subroutine sort(x,n)
C
integer n, i, first, last
real x(n), y(n), temp
logical sorted
C
do 100 i=1,n
y(i)=x(i)
100 continue
C
sorted = .FALSE.
first = 1
last = n-1
150 if( .NOT.sorted ) then
sorted = .TRUE.
do 200 i=first,last
if( y(i) .gt. y(i+1))
temp = y(i)
y(i) = y(i+1)
y(i+1) =temp
sorted = .FALSE.
endif
200 continue
last = last-1
goto 150
endif
do 300 i=1,n
x(i) = y(i)
300 continue
return
end
************************************************************
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news