From b.rowlingson at lancaster.ac.uk  Tue Jun 30 16:24:22 2009
From: b.rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Tue, 30 Jun 2009 15:24:22 +0100
Subject: [Rd] Matrix with random number
In-Reply-To: <237102.1638.qm@web59710.mail.ac4.yahoo.com>
References: <237102.1638.qm@web59710.mail.ac4.yahoo.com>
Message-ID: <d8ad40b50906300724x603c81bkbe7d0cd064e28a45@mail.gmail.com>

> ???? ??? x(i,j) = call myrbeta(1,4,5) ! It's correct?

> The code of the error in R is:
> dyn.load("func.so")
> Error in dyn.load("func.so") :
> ? unable to load shared library '/home/julio/Orientados/Fabio/Fortran/mat-fortran/func.so':
> ? /home/julio/Orientados/Fabio/Fortran/mat-fortran/func.so: undefined symbol: callmyrbeta_

 Fortran doesn't use 'CALL' when calling a function. Try:

      x(i,j) = myrbeta(1,4,5)

Fortran has SUBROUTINEs (which are CALLed and don't return a value)
and FUNCTIONs - which are just used like any other function.

Barry



[Rd] Matrix with random number
Barry Rowlingson